:root {
  --bg: #1a1c1e;
  --bg-soft: #222528;
  --paper: #ebe4d8;
  --paper-2: #f3eee4;
  --ink: #1c1a17;
  --ink-soft: #d8d2c6;
  --muted: #8a8478;
  --line: #34383c;
  --line-paper: #d5cdb9;
  --accent: #c4a574;
  --accent-2: #8f9a7a;
  --danger: #c07070;
  --ok: #7a9e84;
  --shadow: 0 12px 40px rgba(0,0,0,.35);
  --radius: 12px;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink-soft); }
button, textarea, input { font: inherit; color: inherit; }
a { color: var(--accent); }

/* Login */
.login-body {
  display: grid; place-items: center; min-height: 100%;
  background: radial-gradient(ellipse at top, #2a2e32 0%, var(--bg) 60%);
}
.login-card {
  width: min(400px, calc(100% - 32px));
  background: var(--paper);
  color: var(--ink);
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--shadow);
}
.login-brand { margin-bottom: 20px; }
.login-card .field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; font-size: .9rem; }
.login-card input {
  border: 1px solid var(--line-paper); border-radius: 10px; padding: 10px 12px; background: #fff;
  color: var(--ink);
}
.login-hint { font-size: .78rem; color: #6a6458; margin: 12px 0 0; }
.btn.wide { width: 100%; margin-top: 8px; }
.err { color: var(--danger); font-size: .88rem; margin: 0; }

/* Shell */
.sb-app {
  max-width: 1440px; margin: 0 auto; min-height: 100%;
  display: flex; flex-direction: column; padding: 14px; gap: 12px;
}
.sb-top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 16px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.logo {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: #2f3438; color: var(--accent); border: 1px solid #4a4540;
}
button.logo {
  padding: 0;
  margin: 0;
  cursor: pointer;
  line-height: 1;
}
button.logo:hover,
button.logo.is-on { border-color: var(--accent); }

.brand h1 { margin: 0; font-size: 1.05rem; letter-spacing: .02em; font-weight: 600; }
.tag { margin: 2px 0 0; color: var(--muted); font-size: .78rem; }
.top-right { display: flex; align-items: center; gap: 10px; }
.tokens {
  text-align: right; background: #1e2225; border: 1px solid #3a4038;
  border-radius: 10px; padding: 6px 12px; min-width: 130px;
}
.tok-label { display: block; font-size: .68rem; color: var(--muted); }
.tok-avail { font-size: 1.25rem; font-weight: 700; color: var(--accent); }
.tok-detail { display: block; font-size: .68rem; color: var(--muted); }

.sb-grid {
  flex: 1; min-height: 0;
  display: grid;
  grid-template-columns: 260px minmax(0, 1.2fr) 320px;
  gap: 12px;
}
.sb-grid-2 {
  grid-template-columns: minmax(0, 1.35fr) 340px;
}
.pane {
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--radius); display: flex; flex-direction: column; min-height: 580px;
  overflow: hidden;
}
.pane-h {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-bottom: 1px solid var(--line);
}
.pane-h h2 { margin: 0; font-size: .92rem; font-weight: 600; letter-spacing: .04em; color: var(--accent); }

/* Board */
.board-pane { background: var(--paper); color: var(--ink); border-color: #3a3832; }
.board-pane .pane-h { border-color: var(--line-paper); }
.board-pane .pane-h h2 { color: #6b5a3e; }
.board-body { padding: 16px; overflow-y: auto; }
.board-title {
  margin: 0 0 8px; font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem; font-weight: 600; letter-spacing: -.01em;
}
.board-logline { margin: 0 0 16px; color: #5c564a; font-size: .9rem; line-height: 1.5; }
.shot-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.shot-list li {
  border: 1px solid var(--line-paper); border-radius: 10px; padding: 10px 12px; background: var(--paper-2);
}
.shot-list .n {
  display: inline-block; font-size: .72rem; letter-spacing: .06em;
  color: #8a7350; margin-bottom: 4px;
}
.shot-list .label { font-weight: 650; font-size: .9rem; }
.shot-list .text { margin: 4px 0 0; font-size: .82rem; color: #5c564a; line-height: 1.4; }
.board-empty { color: #8a8478; font-size: .85rem; }

/* Chat */
.messages {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
}
.msg {
  max-width: 94%; padding: 11px 13px; border-radius: 12px;
  line-height: 1.55; white-space: pre-wrap; word-break: break-word; font-size: .92rem;
}
.msg.user {
  align-self: flex-end; background: #2d3338; border: 1px solid #3f474e;
  border-bottom-right-radius: 4px;
}
.msg.assistant {
  align-self: flex-start; background: #25282c; border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
}
.msg strong { font-weight: 700; color: var(--accent); }
.msg code {
  display: block; margin-top: 6px; padding: 8px 10px;
  background: #1a1c1e; border-radius: 8px; border: 1px dashed #454038;
  font-size: .82rem; white-space: pre-wrap; color: #d2c6b0;
}

.plan-card {
  margin-top: 10px; background: var(--paper); color: var(--ink);
  border-radius: 12px; padding: 12px; border: 1px solid #cfc5b0;
}
.plan-card h4 { margin: 0 0 4px; font-family: Georgia, serif; font-size: 1.05rem; }
.plan-card .ll { margin: 0 0 10px; font-size: .85rem; color: #5c564a; }
.plan-shots { display: flex; flex-direction: column; gap: 8px; }
.plan-shot {
  display: flex; gap: 8px; align-items: flex-start;
  background: var(--paper-2); border-radius: 10px; padding: 8px 10px;
  border: 1px solid var(--line-paper);
}
.plan-shot .meta { flex: 1; min-width: 0; }
.plan-shot .sn { font-size: .72rem; color: #8a7350; }
.plan-shot .st { font-weight: 650; font-size: .88rem; }
.plan-shot .sx { font-size: .8rem; color: #5c564a; margin-top: 2px; }
.plan-draft {
  margin-top: 10px; padding: 8px 10px; background: #fff; border-radius: 8px;
  border: 1px dashed var(--line-paper); font-size: .8rem; color: #4a453c;
}

.card {
  margin-top: 10px; padding: 10px; background: #1a1c1e;
  border: 1px solid var(--line); border-radius: 12px;
}
.card .meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: .78rem; color: var(--muted); margin-bottom: 8px; }
.pill {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  background: #2f3430; color: var(--accent); font-size: .72rem;
}
.card svg { width: 100%; max-width: 320px; height: auto; border-radius: 8px; display: block; }

.composer { border-top: 1px solid var(--line); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chat-form { display: flex; gap: 8px; align-items: flex-end; }
.chat-form textarea {
  flex: 1; resize: vertical; min-height: 52px;
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  background: #1a1c1e; color: var(--ink-soft);
}
.hint { margin: 0; font-size: .72rem; color: var(--muted); }

.btn {
  border: 1px solid var(--line); background: #2a2e32; border-radius: 9px;
  padding: 7px 11px; cursor: pointer; color: var(--ink-soft);
}
.btn:hover { background: #32383d; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.primary { background: #3a342a; border-color: #5a4e38; color: var(--accent); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 4px 8px; font-size: .78rem; }
.btn.send { min-width: 72px; background: var(--ink-soft); color: var(--bg); border-color: var(--ink-soft); }
.btn.danger { color: var(--danger); border-color: #5a3838; }
.file-btn { display: inline-flex; align-items: center; cursor: pointer; }

/* Drawer */

.form-pane .job-form { padding: 16px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; }
.prod-lead { margin: 0; font-size: .88rem; color: var(--muted); line-height: 1.45; }
.kind-row { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 0; display: flex; gap: 16px; align-items: center; }
.kind-row legend { padding: 0 6px; color: var(--accent); font-size: .8rem; }
.kind-row label { display: flex; gap: 6px; align-items: center; font-size: .9rem; }
.job-form .field { display: flex; flex-direction: column; gap: 6px; font-size: .9rem; }
.job-form textarea {
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  background: #1a1c1e; color: var(--ink-soft); resize: vertical;
}
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.model-list .mcost { margin-left: auto; color: var(--accent); font-size: .8rem; }

.drawer-pane { min-height: 580px; }
.tabs {
  display: flex; border-bottom: 1px solid var(--line); padding: 0 4px;
}
.tab {
  flex: 1; background: transparent; border: none; color: var(--muted);
  padding: 12px 6px; cursor: pointer; font-size: .82rem; border-bottom: 2px solid transparent;
}
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-panels { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.tab-panel { display: none; flex: 1; overflow-y: auto; padding: 10px; }
.tab-panel.active { display: flex; flex-direction: column; }
.empty-hint { color: var(--muted); font-size: .82rem; margin: 8px 4px; }

.asset-list, .result-list, .queue-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.asset-item, .result-item, .queue-item {
  border: 1px solid var(--line); border-radius: 10px; padding: 10px;
  background: #1e2124; cursor: default;
}
.asset-item .t, .result-item .t, .queue-item .t { font-weight: 600; font-size: .86rem; }
.asset-item .s, .result-item .s, .queue-item .s { font-size: .75rem; color: var(--muted); margin-top: 3px; }
.asset-item img {
  width: 100%; max-height: 100px; object-fit: cover; border-radius: 6px; margin-top: 6px;
}
.result-item { cursor: pointer; }
.result-item:hover { border-color: #5a5040; }
.result-item svg { width: 100%; height: auto; border-radius: 6px; margin-top: 6px; }
.result-detail {
  margin-top: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #1a1c1e;
}
.result-detail svg { width: 100%; height: auto; border-radius: 8px; }

.queue-item .row1 { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; font-size: .86rem; }
.status-waiting { color: var(--accent); }
.status-running { color: #8eb4c8; }
.status-done { color: var(--ok); }
.status-failed, .status-cancelled { color: var(--danger); }

dialog:not([open]) { display: none !important; }
dialog {
  border: 1px solid var(--line); border-radius: 14px; padding: 0;
  background: var(--bg-soft); color: var(--ink-soft); box-shadow: var(--shadow);
  max-width: 460px; width: calc(100% - 24px);
}
dialog::backdrop { background: rgba(0,0,0,.55); }
.ask-dialog { max-width: 380px; }
.ask-body { padding: 18px 18px 14px; display: flex; flex-direction: column; gap: 16px; }
.ask-msg { margin: 0; white-space: pre-line; line-height: 1.55; font-size: .9rem; color: var(--ink-soft); }
.ask-check { display: flex; align-items: flex-start; gap: 8px; font-size: .84rem; color: var(--ink-soft); cursor: pointer; }
.ask-check[hidden] { display: none; }
.ask-check input { margin-top: 3px; accent-color: var(--accent); }
.ask-actions { display: flex; justify-content: flex-end; gap: 8px; }
.ask-actions .btn { min-width: 72px; }
.dialog-body { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.dialog-body h3 { margin: 0; color: var(--accent); }
.dialog-body label { display: flex; flex-direction: column; gap: 6px; font-size: .88rem; }
.dialog-body textarea, .dialog-body input[type="text"] {
  border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: #1a1c1e; color: var(--ink-soft);
}
.dialog-row { display: flex; flex-direction: column; gap: 8px; font-size: .88rem; }
.model-list { display: flex; flex-direction: column; gap: 6px; }
.model-list label {
  flex-direction: row; align-items: center; gap: 8px;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #1e2124;
}
.model-list label .mcost { margin-left: auto; color: var(--accent); font-size: .8rem; }
.cost-line { margin: 0; color: var(--accent); font-size: .9rem; }
.shot-tag { margin: 0; font-size: .82rem; color: var(--muted); }
menu { display: flex; justify-content: flex-end; gap: 8px; margin: 0; padding: 0; }

@media (max-width: 1100px) {
  .sb-grid, .sb-grid-2 { grid-template-columns: 1fr; }
  .pane { min-height: 360px; }
}

.model-field { display: flex !important; }
.model-select-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.model-select-row select {
  flex: 1; min-width: 220px;
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  background: #1a1c1e; color: var(--ink-soft);
  appearance: auto;
}
.model-est {
  color: var(--accent); font-size: .9rem; white-space: nowrap; font-weight: 600;
}

.prog-wrap { margin-top: 8px; }
.prog-bar {
  height: 8px; border-radius: 999px; background: #2a2e32; overflow: hidden;
  border: 1px solid var(--line);
}
.prog-fill {
  height: 100%; width: 0; background: linear-gradient(90deg, #8f9a7a, var(--accent));
  transition: width .4s ease;
}
.prog-meta { margin-top: 4px; font-size: .75rem; color: var(--muted); }
.result-img {
  display: block; width: 100%; max-height: 280px; object-fit: contain;
  border-radius: 8px; margin-top: 8px; background: #121416;
}

#refAssetField select {
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  background: #1a1c1e; color: var(--ink-soft);
}


.ratio-picker { position: relative; }
.ratio-btn, .ratio-menu button {
  display: flex; align-items: center; gap: 10px;
  width: 100%; text-align: left;
  border: 1px solid var(--line); border-radius: 10px;
  background: #1a1c1e; color: var(--ink-soft);
  padding: 8px 12px; cursor: pointer;
}
.ratio-menu {
  position: fixed; z-index: 40;
  width: min(320px, 80vw);
  display: grid; grid-template-columns: 120px 1fr; gap: 8px;
  padding: 10px; border: 1px solid var(--line); border-radius: 14px;
  background: #1c1e21; box-shadow: var(--shadow);
}
.ratio-menu[hidden] { display: none !important; }
.ratio-preview {
  display: grid; place-items: center;
  border-radius: 10px; background: #141618;
}
.ratio-menu ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ratio-menu button.active { border-color: var(--accent); color: var(--accent); }
.ratio-glyph {
  width: 22px; height: 22px; display: inline-grid; place-items: center; flex: none;
}
.ratio-glyph::before {
  content: ""; display: block; border: 1.5px solid currentColor; border-radius: 2px;
  width: 14px; height: 14px;
}
.ratio-glyph[data-aspect="2:3"]::before { width: 10px; height: 16px; }
.ratio-glyph[data-aspect="3:2"]::before { width: 16px; height: 10px; }
.ratio-glyph[data-aspect="9:16"]::before { width: 8px; height: 18px; }
.ratio-glyph[data-aspect="16:9"]::before { width: 18px; height: 8px; }
.ratio-preview .ratio-glyph { width: 72px; height: 72px; }
.ratio-preview .ratio-glyph::before { border-width: 2px; }
.ratio-preview .ratio-glyph[data-aspect="1:1"]::before { width: 36px; height: 36px; }
.ratio-preview .ratio-glyph[data-aspect="2:3"]::before { width: 28px; height: 42px; }
.ratio-preview .ratio-glyph[data-aspect="3:2"]::before { width: 42px; height: 28px; }
.ratio-preview .ratio-glyph[data-aspect="9:16"]::before { width: 22px; height: 48px; }
.ratio-preview .ratio-glyph[data-aspect="16:9"]::before { width: 52px; height: 28px; }

.result-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 8px; margin-bottom: 8px;
}
.result-view-pop { flex: 0 0 auto; }
#resultViewMenu { min-width: 168px; padding: 6px; }
#resultViewMenu button {
  display: flex; align-items: center; gap: 8px; white-space: nowrap;
}
#resultViewMenu button::before {
  content: ""; width: 1em; flex: 0 0 1em; text-align: center;
}
#resultViewMenu button.active::before { content: "✓"; }
.result-detail-head {
  display: grid;
  grid-template-columns: 22px 36px minmax(72px, 1fr) 42px minmax(64px, .8fr) minmax(88px, .9fr) minmax(80px, 1.2fr) 108px 72px;
  gap: 6px; align-items: center;
  min-width: 920px;
  padding: 4px 2px 6px;
  font-size: .68rem; color: var(--muted);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 2;
  background: var(--bg-soft);
}
.result-detail-head[hidden] { display: none !important; }
.result-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px;
}
.result-grid.view-xlarge { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.result-grid.view-large { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); }
.result-grid.view-medium { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
.result-grid.view-small { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; }
.result-grid.view-list {
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 2px;
}
.result-name, .result-kind, .result-model, .result-time, .result-prompt { display: none; }
.result-card {
  position: relative; border: 1px solid var(--line); border-radius: 10px;
  background: #1e2124; overflow: hidden;
}
.result-card.selected { border-color: var(--accent); }
.result-open {
  display: block; width: 100%; padding: 0; border: 0; background: #121416; cursor: zoom-in;
}
.result-open img {
  display: block; width: 100%; aspect-ratio: 1; object-fit: cover;
}
.result-cap {
  font-size: .7rem; color: var(--muted); padding: 6px 8px 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.result-check-wrap {
  position: absolute; top: 6px; left: 6px; z-index: 1;
  width: 22px; height: 22px; display: grid; place-items: center;
  border-radius: 6px; background: rgba(0,0,0,.45);
}
.result-check { width: 14px; height: 14px; margin: 0; }
.result-selectbar {
  position: absolute; z-index: 30;
  left: 6px; right: 6px; bottom: 8px;
  width: auto; transform: none;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 14px;
  background: #16181a; box-shadow: var(--shadow);
}
.result-selectbar[hidden] { display: none !important; }
.result-selectbar span { flex: 1; font-size: .82rem; }
.view-dialog {
  width: min(1100px, calc(100vw - 24px)); max-width: none;
  height: calc(100vh - 24px); max-height: calc(100vh - 24px);
  overflow: hidden;
  background: #101214; padding: 0; margin: auto;
}
.seq-dialog {
  width: min(1100px, calc(100vw - 16px));
  height: min(100vh - 16px, 100dvh);
  max-width: none;
  overflow: hidden;
  background: #101214;
  padding: 0;
  margin: auto;
  border: 1px solid var(--line);
}
.seq-dialog[open] { display: flex; flex-direction: column; }
.seq-bar {
  display: flex; align-items: center; gap: 8px; flex: 0 0 auto;
  padding: 10px 12px; border-bottom: 1px solid var(--line);
}
.seq-bar p { margin: 0; font-size: .82rem; color: var(--muted); flex: 1; min-width: 0; }
.seq-stage {
  flex: 1; min-height: 0;
  display: grid; place-items: center; background: #0c0d0e;
}
.seq-stage img, .seq-stage video {
  max-width: 100%; max-height: 100%; object-fit: contain;
}
#seqImg[hidden], #seqVideo[hidden] { display: none !important; }
.view-dialog[open] { display: flex; flex-direction: column; }
.view-bar {
  display: flex; align-items: center; gap: 12px; flex: 0 0 auto;
  padding: 10px 12px; border-bottom: 1px solid var(--line);
}
.view-bar p { margin: 0; font-size: .82rem; color: var(--muted); flex: 1; min-width: 0; }
.view-zoom { display: flex; align-items: center; gap: 4px; }
.view-zoom[hidden] { display: none !important; }
.zoom-label {
  border: 0; background: transparent; color: var(--ink-soft);
  min-width: 52px; cursor: pointer; font-size: .82rem;
}
.view-stage {
  flex: 1; min-height: 0; overflow: hidden;
  display: grid; place-items: center; background: #0c0d0e;
}
.view-stage.is-zoomed { overflow: auto; }
#viewImg {
  display: block; max-width: 100%; max-height: 100%; margin: 0; object-fit: contain;
  -webkit-user-drag: none; user-select: none; pointer-events: none;
}
#viewImg.is-zoomed { max-width: none; max-height: none; }
#viewImg:not(.is-ready),
#viewImg[hidden],
#viewVideo[hidden] { display: none !important; }

.prompt-box {
  border: 1px solid var(--line); border-radius: 12px; background: #1a1c1e;
  padding: 8px;
}
.prompt-box.dropping { border-color: var(--accent); background: #22261c; }
.prompt-box { position: relative; }
.prompt-box.is-translating { border-color: #5a5040; cursor: progress; }
.prompt-box.is-translating textarea { opacity: .5; cursor: progress; }
.prompt-box.is-translating::before {
  content: "";
  position: absolute;
  left: 12px; right: 12px; top: -1px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent) no-repeat;
  background-size: 40% 100%;
  animation: prompt-busy 1.1s ease-in-out infinite;
  pointer-events: none;
}
@keyframes prompt-busy {
  from { background-position: -70% 0; }
  to { background-position: 170% 0; }
}
html.is-waiting, html.is-waiting * { cursor: progress !important; }
.prompt-box textarea {
  width: 100%; border: 0; background: transparent; resize: vertical;
  color: var(--ink-soft); padding: 4px;
}
.prompt-refs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.prompt-refs[hidden] { display: none; }
.ref-slot-wrap { width: 72px; }
.ref-slot {
  width: 72px; height: 72px; padding: 0;
  border: 1.5px dashed #8b949e; border-radius: 8px;
  background: transparent; color: #d5dbe1;
  display: grid; place-items: center; position: relative; cursor: pointer;
}
.ref-slot .plus { font-size: 28px; line-height: 1; font-weight: 300; }
.ref-slot.over { border-color: var(--accent); background: #22261c; }
.ref-slot.filled { border-style: solid; border-color: transparent; padding: 0; cursor: default; overflow: hidden; }
.ref-slot.filled img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ref-slot-name { display: block; margin-top: 4px; font-size: .68rem; color: var(--muted); text-align: center; }
.ref-role {
  display: block; width: 100%; margin-top: 4px; padding: 1px 2px;
  font-size: .68rem; color: var(--ink-soft); background: #1c1f22;
  border: 1px solid var(--line); border-radius: 4px;
}
.ref-keep {
  position: absolute; left: 3px; bottom: 3px; width: 20px; height: 20px; padding: 0;
  border: 0; border-radius: 50%; background: rgba(20, 22, 24, .75); color: #ffd866;
  font-size: 12px; line-height: 20px; cursor: pointer;
}
.omni-bar {
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px;
  padding: 6px 4px 8px; margin-bottom: 8px; border-bottom: 1px solid var(--line);
}
.omni-bar[hidden] { display: none; }
.omni-bar-title { width: 100%; font-size: .7rem; color: var(--muted); }
.omni-chip { position: relative; width: 60px; }
.omni-chip-pick {
  width: 60px; height: 60px; padding: 0; border: 1px solid var(--line); border-radius: 6px;
  overflow: hidden; background: transparent; cursor: pointer; display: block;
}
.omni-chip-pick:hover { border-color: var(--accent); }
.omni-chip-pick img { width: 100%; height: 100%; object-fit: cover; display: block; }
.omni-chip-name {
  display: block; margin-top: 3px; font-size: .66rem; color: var(--ink-soft);
  text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.omni-chip .chip-x { opacity: .55; }
.omni-chip:hover .chip-x { opacity: 1; }
.omni-add {
  height: 60px; padding: 0 10px; border: 1.5px dashed #8b949e; border-radius: 6px;
  background: transparent; color: #d5dbe1; font-size: .72rem; cursor: pointer;
}
.chip-x {
  position: absolute; top: -6px; right: -6px; width: 18px; height: 18px;
  border: 0; border-radius: 50%; background: #2a2e32; color: #fff; cursor: pointer;
  line-height: 18px; padding: 0;
}
.prompt-tools { display: flex; }
#btnAddRef[hidden] { display: none !important; }
.plus-btn {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--line); background: #141618; color: var(--ink-soft);
  font-size: 1.2rem; cursor: pointer;
}
.plus-btn:hover { border-color: var(--accent); color: var(--accent); }

.prompt-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kind-pills { display: flex; gap: 6px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); border-radius: 999px;
  background: #141618; color: var(--ink-soft);
  padding: 6px 12px; cursor: pointer; font-size: .82rem;
}
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill:has(input:checked), .ratio-pill[aria-expanded="true"] {
  border-color: var(--accent); color: var(--accent); background: #22261c;
}
.ratio-picker { position: relative; }
.ratio-pill { background: #141618; }
.ratio-btn, .ratio-menu button { width: auto; }

.ratio-glyph[data-aspect="3:4"]::before { width: 12px; height: 16px; }
.ratio-glyph[data-aspect="4:3"]::before { width: 16px; height: 12px; }
.ratio-glyph[data-aspect="21:9"]::before { width: 20px; height: 8px; }
.ratio-glyph[data-aspect="auto"]::before { width: 14px; height: 14px; border-style: dashed; }
.ratio-preview .ratio-glyph[data-aspect="3:4"]::before { width: 30px; height: 40px; }
.ratio-preview .ratio-glyph[data-aspect="4:3"]::before { width: 44px; height: 33px; }
.ratio-preview .ratio-glyph[data-aspect="21:9"]::before { width: 63px; height: 27px; }
.pop { position: relative; }
.pop-menu {
  position: fixed; z-index: 40; min-width: 140px;
  display: flex; flex-direction: column; gap: 2px;
  padding: 8px; border: 1px solid var(--line); border-radius: 14px;
  background: #1c1e21; box-shadow: var(--shadow);
}
.pop-menu[hidden] { display: none !important; }
.pop-menu button {
  border: 0; background: transparent; color: var(--ink-soft);
  text-align: left; padding: 8px 12px; border-radius: 8px; cursor: pointer;
}
.pop-menu button.active, .pop-menu button:hover { background: #2a2e24; color: var(--accent); }
.tool-row { display: flex; gap: 6px; align-items: center; }
.drag-pill { cursor: ew-resize; user-select: none; touch-action: none; }
.drag-pill.is-off { opacity: .4; cursor: default; }
.check-pill input { position: static; opacity: 1; pointer-events: auto; accent-color: var(--accent); }
.kind-pills {
  display: flex; gap: 0; padding: 3px;
  border: 1px solid var(--line); border-radius: 999px; background: #101214;
}
.kind-pills .pill { border: 0; background: transparent; }
.kind-pills .pill:has(input:checked) { background: #22261c; border-radius: 999px; }

#viewVideo { width: auto; max-width: 100%; max-height: 100%; height: auto; background: #000; object-fit: contain; }
.result-open { position: relative; }
.result-open video { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: #111; pointer-events: none; }
.play-badge {
  position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%);
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(0,0,0,.5); pointer-events: none;
}
.play-badge::before {
  content: ""; position: absolute; left: 14px; top: 10px;
  border-style: solid; border-width: 8px 0 8px 12px;
  border-color: transparent transparent transparent #fff;
}
.result-dl {
  position: absolute; top: 6px; right: 6px; z-index: 2;
  border: 0; border-radius: 8px; padding: 4px 8px;
  background: rgba(0,0,0,.62); color: #fff; font-size: .72rem; cursor: pointer;
  opacity: 0; pointer-events: none;
}
.result-card:hover .result-dl { opacity: 1; pointer-events: auto; }

.result-grid.view-small .result-cap { font-size: .62rem; padding: 3px 4px 4px; }
.result-grid.view-small .result-check-wrap { width: 16px; height: 16px; top: 3px; left: 3px; }
.result-grid.view-small .result-dl { font-size: .62rem; padding: 2px 4px; }
.result-grid.view-small .play-badge,
.result-grid.view-list .play-badge,
.result-grid.view-details .play-badge {
  width: 16px; height: 16px;
}
.result-grid.view-small .play-badge::before,
.result-grid.view-list .play-badge::before,
.result-grid.view-details .play-badge::before {
  left: 6px; top: 4px;
  border-width: 4px 0 4px 6px;
}
.result-grid.view-list .result-card {
  display: flex; align-items: center; gap: 6px;
  padding: 3px 4px; overflow: hidden;
}
.result-grid.view-list .result-check-wrap {
  position: static; background: transparent; flex: 0 0 auto;
}
.result-grid.view-list .result-open {
  width: 28px; height: 28px; flex: 0 0 28px;
}
.result-grid.view-list .result-open img,
.result-grid.view-list .result-open video,
.result-grid.view-details .result-open img,
.result-grid.view-details .result-open video,
.result-grid.view-tile .result-open img,
.result-grid.view-tile .result-open video {
  width: 100%; height: 100%; aspect-ratio: 1; object-fit: cover;
}
.result-grid.view-list .result-name {
  display: block; flex: 1; min-width: 0; order: 3;
  font-size: .75rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.result-grid.view-list .result-cap,
.result-grid.view-details .result-cap,
.result-grid.view-tile .result-cap { display: none; }
.result-grid.view-list .result-card:hover .result-name { padding-right: 68px; }
.result-grid.view-list .result-dl {
  top: 50%; right: 4px; transform: translateY(-50%);
}
.result-grid.view-details .result-dl { white-space: nowrap; }
.result-grid.view-details {
  display: flex; flex-direction: column; gap: 0;
  min-width: 920px;
}
.result-grid.view-details .result-card {
  display: grid;
  grid-template-columns: 22px 36px minmax(72px, 1fr) 42px minmax(64px, .8fr) minmax(88px, .9fr) minmax(80px, 1.2fr) 108px 72px;
  gap: 6px; align-items: center;
  border-radius: 0; border-left: 0; border-right: 0; border-top: 0;
  background: transparent; padding: 4px 2px;
  overflow: hidden;
}
.result-grid.view-details .result-card:hover { background: #262a2e; }
.result-grid.view-details .result-card.selected { background: #2a2e24; }
.result-grid.view-details .result-check-wrap {
  position: static; background: transparent; grid-column: 1;
}
.result-grid.view-details .result-open { grid-column: 2; width: 32px; height: 32px; }
.result-grid.view-details .result-name { grid-column: 3; }
.result-grid.view-details .result-kind { grid-column: 4; }
.result-grid.view-details .result-model { grid-column: 5; }
.result-grid.view-details .result-time { grid-column: 6; }
.result-grid.view-details .result-prompt { grid-column: 7; }
.result-grid.view-details .result-dl {
  position: static; grid-column: 9; margin-left: 0; justify-self: end;
}
.result-grid.view-details .result-name,
.result-grid.view-details .result-kind,
.result-grid.view-details .result-model,
.result-grid.view-details .result-time,
.result-grid.view-details .result-prompt {
  display: block; min-width: 0;
  font-size: .75rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.result-grid.view-details .result-kind,
.result-grid.view-details .result-time { color: var(--muted); }
.result-grid.view-tile { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; }
.result-grid.view-tile .result-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  column-gap: 8px; align-items: center;
  padding: 6px 8px;
}
.result-grid.view-tile .result-open {
  grid-column: 1; grid-row: 1 / span 3;
  width: 64px; height: 64px;
}
.result-grid.view-tile .result-name,
.result-grid.view-tile .result-kind,
.result-grid.view-tile .result-model {
  display: block; grid-column: 2; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.result-grid.view-tile .result-name { font-size: .8rem; font-weight: 600; }
.result-grid.view-tile .result-kind,
.result-grid.view-tile .result-model { font-size: .72rem; color: var(--muted); }
.result-grid.view-tile .play-badge { width: 22px; height: 22px; }
.result-grid.view-tile .play-badge::before {
  left: 8px; top: 6px;
  border-width: 5px 0 5px 8px;
}

.prompt-foot {
  display: flex; align-items: flex-end; gap: 8px;
}
.prompt-tools { flex: 1; min-width: 0; }
.tool-row[hidden],
#imageTools[hidden],
#videoTools[hidden],
#resField[hidden],
#ratioField[hidden] { display: none !important; }
.model-pill { max-width: 148px; }
.model-pill #modelBtnLabel {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.model-pill .chev { font-size: .7rem; opacity: .75; }
.model-select-hidden {
  position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none;
}
.send-btn {
  width: 36px; height: 36px; flex: 0 0 auto;
  border: 0; border-radius: 50%; padding: 0;
  background: #3b6cff; color: #fff;
  display: grid; place-items: center; cursor: pointer;
}
.send-btn svg { width: 18px; height: 18px; display: block; }
.send-btn:hover { filter: brightness(1.08); }
.send-btn:disabled { opacity: .4; cursor: default; filter: none; }

.translate-dialog {
  width: min(640px, calc(100vw - 32px));
  max-height: min(70vh, 640px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  color: var(--text);
}
.translate-dialog::backdrop { background: rgba(0, 0, 0, .45); }
.translate-bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.translate-bar p { margin: 0; font-size: .9rem; }
.translate-body { margin: 0; padding: 14px; white-space: pre-wrap; font: inherit; line-height: 1.55; overflow: auto; max-height: calc(70vh - 58px); }

.result-extra {
  padding: 6px 8px 8px;
  display: flex; flex-direction: column; gap: 4px; min-width: 0;
}
.result-extra[hidden] { display: none !important; }
.result-extra-model {
  font-size: .72rem; color: var(--ink-soft);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.result-extra-prompt {
  font-size: .68rem; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden; word-break: break-word;
}
.result-extra-refs, .result-refs { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.result-extra-refs img, .result-refs img, .view-refs img {
  width: 32px; height: 32px; object-fit: cover; border-radius: 4px; background: #111;
}
.result-refs { display: none; }
.result-reuse {
  border: 1px solid var(--line); background: transparent; color: var(--ink-soft);
  border-radius: 999px; padding: 2px 8px; font-size: .68rem; cursor: pointer;
}
.result-reuse:hover { border-color: var(--accent); color: var(--accent); }
.result-grid.view-list .result-extra,
.result-grid.view-details .result-extra { display: none !important; }
.result-grid.view-tile .result-extra { grid-column: 2; grid-row: 4; padding: 0; min-width: 0; }
.result-grid.view-tile .result-extra-model { display: none; }
.result-grid.view-tile .result-open { grid-row: 1 / span 4; }
.result-grid.view-details .result-refs {
  display: flex; grid-column: 8; min-width: 0;
}
.result-grid.view-details .result-refs img { width: 28px; height: 28px; }
.result-grid.view-list .result-model,
.result-grid.view-list .result-prompt {
  display: block; min-width: 0; font-size: .72rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.result-grid.view-list .result-model { flex: 0 1 108px; order: 4; }
.result-grid.view-list .result-prompt { flex: 1.2; order: 5; color: var(--muted); }
.result-grid.view-list .result-refs { display: flex; flex: 0 0 auto; order: 6; }
.result-grid.view-list .result-refs img { width: 22px; height: 22px; }
.result-grid.view-small .result-extra { padding: 4px; }
.result-grid.view-small .result-extra-prompt { -webkit-line-clamp: 2; }
.result-grid.view-small .result-extra-refs img { width: 22px; height: 22px; }
.result-grid.view-small .result-reuse { padding: 1px 6px; }
.view-body { flex: 1; min-height: 0; display: flex; }
.view-side {
  width: 260px; flex: 0 0 260px;
  border-left: 1px solid var(--line);
  padding: 12px; overflow: auto;
  display: flex; flex-direction: column; gap: 4px;
}
.view-k { margin: 8px 0 0; font-size: .68rem; color: var(--muted); }
.view-v { margin: 0; font-size: .82rem; color: var(--ink-soft); word-break: break-word; }
.view-prompt { white-space: pre-wrap; }
.view-refs { display: flex; flex-wrap: wrap; gap: 6px; }
.view-refs img { width: 64px; height: 64px; border-radius: 6px; }
.view-empty, .view-note { margin: 0; font-size: .78rem; color: var(--muted); }
#viewNote[hidden], #viewReuse[hidden] { display: none !important; }
#viewReuse { align-self: flex-start; margin-top: 8px; }
@media (max-width: 800px) {
  .view-body { flex-direction: column; }
  .view-side {
    width: auto; flex: 0 0 auto; max-height: 34%;
    border-left: 0; border-top: 1px solid var(--line);
  }
}

.queue-list { gap: 1px; }
#panelQueue.tab-panel { padding: 4px 6px; }
.queue-item {
  padding: 1px 4px;
  border-radius: 4px;
  border-color: transparent;
  background: transparent;
}
.queue-item:hover { background: #262a2e; }
.queue-item.is-link { cursor: pointer; }
.queue-item.is-link:hover { background: #2b3034; }
.q-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
}
.q-thumb {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 4px;
  object-fit: cover;
  background: #121416;
  display: block;
}
.q-thumb.q-play, .q-thumb.q-vid {
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
.q-thumb.q-play::before, .q-thumb.q-vid i {
  content: "";
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 5px 0 5px 8px;
  border-color: transparent transparent transparent #e8e8e8;
  margin-left: 2px;
}
.q-thumb.q-vid video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  background: #111;
}
.q-thumb.q-vid i { position: relative; z-index: 1; filter: drop-shadow(0 0 2px #000); }
.q-copy {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.15;
}
.q-copy .q-status { font-size: .74rem; font-weight: 600; }
.q-copy .q-sec { font-size: .68rem; color: var(--muted); font-weight: 500; }
.queue-item .cancel-btn {
  margin: 0;
  padding: 0 6px;
  line-height: 1.4;
  flex: 0 0 auto;
  font-size: .68rem;
}
.q-tip {
  position: fixed;
  z-index: 50;
  width: 248px;
  padding: 8px 10px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #16181a;
  box-shadow: 0 10px 28px rgba(0,0,0,.45);
  pointer-events: auto;
}
.q-tip-title { font-size: .74rem; font-weight: 700; margin: 0 0 6px; }
.q-tip-row {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 6px;
  font-size: .68rem;
  line-height: 1.35;
  margin-top: 2px;
}
.q-tip-row span:first-child { color: var(--muted); }
.q-tip-row span:last-child { min-width: 0; word-break: break-all; }
.send-btn { position: relative; }
.send-btn.busy:disabled { opacity: 1; cursor: progress; }
.send-btn.busy svg { visibility: hidden; }
.send-btn.busy::after {
  content: "";
  width: 14px;
  height: 14px;
  box-sizing: border-box;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: send-spin .7s linear infinite;
}
@keyframes send-spin { to { transform: rotate(360deg); } }


.field-name { display: inline-flex; align-items: baseline; gap: 8px; }
#promptLang {
  font-size: .75rem;
  font-weight: 650;
  color: var(--accent);
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}
#promptLang:hover { text-decoration: underline; }
#promptLang:disabled { opacity: .6; cursor: default; text-decoration: none; }
.prompt-style {
  flex: 0 0 auto;
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px 3px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: .72rem;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
.prompt-style input { margin: 0; width: 13px; height: 13px; accent-color: var(--accent); cursor: pointer; }
.prompt-style:hover { color: #e8e4dc; }
.prompt-style.is-on {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
}

/* Workspace: fixed side columns, flexible center, window height */
html, body { height: 100%; overflow: hidden; }
.sb-app {
  max-width: none;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
.sb-workspace {
  display: flex;
  align-items: stretch;
  flex: 1;
  min-height: 0;
  gap: 10px;
}
.sb-workspace .pane { min-height: 0; height: auto; }
.nav-pane {
  width: 220px;
  flex: 0 0 220px;
  display: flex;
  flex-direction: column;
}
.nav-pane .pane-h { gap: 8px; }
.nav-pane .pane-h h2 {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-pane .pane-h h2#navTitle { cursor: pointer; }
.nav-pane .pane-h h2#navTitle:hover { color: var(--accent); }
#btnNavBack[hidden], #btnNavAdd[hidden] { display: none !important; }
.nav-list {
  list-style: none;
  margin: 0;
  padding: 8px;
  overflow: auto;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.project-item, .cut-slide {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #1e2124;
  color: var(--ink-soft);
  padding: 8px;
  cursor: pointer;
}
.project-item:hover, .cut-slide:hover { border-color: #5a5040; }
.cut-slide.active { border-color: var(--accent); background: #22261c; }
.cut-slide { cursor: pointer; }
.cut-card .cut-media img { cursor: grab; }
.cut-card .cut-media img:active { cursor: grabbing; }
.cut-card .cut-media img.is-dragging { opacity: .45; }
.cut-row.drop-on .cut-slide,
.project-row.drop-on .project-item,
.board-cell.drop-on,
.scene-card.drop-on {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 2px var(--accent);
}
.project-row.is-dragging,
.cut-row.is-dragging { opacity: .45; }
.project-name { font-weight: 650; font-size: .86rem; }
.project-meta { font-size: .72rem; color: var(--muted); }
.cut-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 6px;
  background: #121416;
  overflow: hidden;
  display: block;
}
.cut-trash {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 2;
  width: 26px;
  height: 26px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 7px;
  background: rgba(12, 12, 12, .72);
  color: #f3f3f3;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
}
.cut-slide:hover .cut-trash,
.cut-slide:focus-within .cut-trash,
.tl-clip:hover .cut-trash,
.tl-clip:focus-within .cut-trash,
.cut-trash:focus {
  opacity: 1;
  pointer-events: auto;
}
.cut-trash:hover { background: #8d2f2f; color: #fff; }
.cut-trash svg { width: 14px; height: 14px; display: block; }
.cut-thumb img, .cut-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #111;
  pointer-events: none;
}
.cut-name { font-size: .75rem; text-align: center; color: var(--muted); }
.cut-slide.active .cut-name { color: var(--accent); }

.work-pane {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.work-scroll { flex: 1; min-height: 0; min-width: 0; overflow-x: hidden; overflow-y: auto; scrollbar-gutter: stable; }
.cut-feed {
  list-style: none;
  margin: 0;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cut-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #1e2124;
  overflow: hidden;
  display: flex;
  flex-direction: row;
  align-items: stretch;
}
.cut-card.is-newest { border-color: var(--accent); }
.cut-card.is-picked { border-color: var(--accent); }
.cut-card .cut-media {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-width: 0;
  background: #121416;
}
.cut-side {
  position: relative;
  flex: 0 0 34%;
  width: 34%;
  max-width: 340px;
  min-width: 148px;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line);
  background: #1a1d20;
}
.cut-tag {
  flex: 0 0 auto;
  padding: 8px 36px 0 12px;
  font-size: .75rem;
  font-weight: 650;
  color: var(--accent);
}
.cut-card img, .cut-card video {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(70vh, 720px);
  object-fit: contain;
  object-position: center;
  background: #121416;
  min-width: 0;
}
.cut-prompt-block {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
}
.cut-prompt {
  display: block;
  width: 100%;
  flex: 0 1 auto;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  padding: 10px 36px 8px 12px;
  cursor: pointer;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: .84rem;
  line-height: 1.45;
  min-height: 48px;
}
.cut-prompt:hover { color: var(--accent); }
.cut-prompt:disabled { cursor: default; color: var(--muted); }
.cut-prompt.is-pending { color: var(--muted); }
.cut-prompt.is-pending::before {
  content: "한글로 바꾸는 중… ";
  display: block; margin-bottom: 4px;
  color: var(--accent); font-size: .72rem;
}
.cut-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 0 12px 10px;
}
.cut-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: .68rem;
  line-height: 1.4;
  white-space: nowrap;
}
.cut-ref-thumbs {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-start;
  align-items: flex-start;
  padding: 0 12px 8px;
}
.cut-card .cut-ref-thumb {
  width: 56px;
  height: 56px;
  max-width: 56px;
  max-height: 56px;
  flex: 0 0 56px;
  object-fit: cover;
  border-radius: 10px;
  background: #121416;
  pointer-events: none;
}
.work-composer {
  flex: 0 0 auto;
  max-height: 46%;
  overflow: auto;
  border-top: 1px solid var(--line);
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #1c1f22;
}
.work-composer[hidden] { display: none !important; }
.work-composer textarea { min-height: 58px; }

.cut-timeline {
  flex: 0 0 148px;
  min-height: 148px;
  display: flex;
  align-items: stretch;
  gap: 8px;
  border-top: 1px solid var(--line);
  background: #141618;
  padding: 8px 8px 6px;
}
.tl-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tl-nav {
  position: relative;
  flex: 0 0 14px;
  height: 14px;
  border-radius: 8px;
  background: #2a2e32;
  touch-action: none;
}
.tl-nav-range {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  min-width: 28px;
  border-radius: 8px;
  background: #6a6e72;
  cursor: grab;
}
.tl-nav-range:active { cursor: grabbing; }
.tl-nav-knob {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  margin: 0;
  padding: 0;
  border: 2px solid #c8ccd0;
  border-radius: 50%;
  background: #1a1c1e;
  transform: translate(-50%, -50%);
  cursor: ew-resize;
  z-index: 2;
}
#tlNavL { left: 0; }
#tlNavR { left: 100%; }
.cut-timeline[hidden] { display: none !important; }
.tl-tools {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 6px;
  flex: 0 0 96px;
}
.tl-clock {
  color: var(--muted);
  font-size: .7rem;
  text-align: center;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 2px 0;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  outline: none;
}
.tl-clock:focus {
  color: var(--ink-soft);
  border-color: var(--accent);
  background: #121416;
}
.tl-track-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: ew-resize;
}
.tl-track-wrap::-webkit-scrollbar { display: none; }
.tl-ruler {
  position: relative;
  height: 18px;
  width: max-content;
  min-width: 100%;
  border-bottom: 1px solid var(--line);
  user-select: none;
}
.tl-tick {
  position: absolute;
  top: 0;
  height: 100%;
  border-left: 1px solid #5a5e62;
  padding-left: 4px;
  font-size: 10px;
  line-height: 18px;
  color: var(--muted);
  pointer-events: none;
}
.tl-tick.is-major { border-left-color: #8a8478; color: var(--ink-soft); }
.tl-tick.is-minor {
  top: auto;
  bottom: 0;
  height: 7px;
  padding: 0;
  border-left-color: #3d4248;
  color: transparent;
}
.tl-track {
  display: flex;
  align-items: stretch;
  gap: 0;
  min-height: 100%;
  width: max-content;
}
.tl-head {
  position: absolute;
  top: 0;
  bottom: 4px;
  width: 2px;
  left: 0;
  z-index: 4;
  background: #f0c36a;
  box-shadow: 0 0 0 1px rgba(0,0,0,.55);
  pointer-events: none;
}
.tl-clip {
  position: relative;
  flex: 0 0 96px;
  width: 96px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #3d5560;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  color: var(--ink-soft);
  padding: 0;
}
.tl-clip:hover { border-color: #5a5040; }
.tl-clip.is-on {
  border-color: var(--accent);
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.tl-clip.is-play { box-shadow: inset 0 -3px 0 #f0c36a; }
.tl-clip.drop-on { border-color: var(--accent); }
.tl-clip.is-dragging { opacity: .45; }
.tl-edge {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 7px;
  z-index: 5;
  touch-action: none;
}
.tl-edge-l {
  left: 0;
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24'><polygon points='12,5 12,19 22,12' fill='%23000'/><polygon points='12,7 12,17 20,12' fill='%23fff'/><path d='M12 2 v20 M12 2 h9 M12 22 h9' fill='none' stroke='%23000' stroke-width='3.4' stroke-linecap='square'/><path d='M12 2 v20 M12 2 h9 M12 22 h9' fill='none' stroke='%23fff' stroke-width='1.7' stroke-linecap='square'/></svg>") 12 12, w-resize;
}
.tl-edge-r {
  right: 0;
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24'><polygon points='12,5 12,19 2,12' fill='%23000'/><polygon points='12,7 12,17 4,12' fill='%23fff'/><path d='M12 2 v20 M12 2 h-9 M12 22 h-9' fill='none' stroke='%23000' stroke-width='3.4' stroke-linecap='square'/><path d='M12 2 v20 M12 2 h-9 M12 22 h-9' fill='none' stroke='%23fff' stroke-width='1.7' stroke-linecap='square'/></svg>") 12 12, e-resize;
}
.tl-edge-l:hover { box-shadow: inset 2px 0 0 #f0c36a; }
.tl-edge-r:hover { box-shadow: inset -2px 0 0 #f0c36a; }
.tl-clip .cut-thumb {
  position: relative;
  flex: 1;
  min-height: 0;
  aspect-ratio: auto;
  border-radius: 0;
  overflow: hidden;
  display: block;
  background: #3d5560;
}
.tl-clip .cut-thumb img,
.tl-clip .cut-thumb video {
  position: absolute;
  left: 0;
  top: 0;
  height: 100% !important;
  width: auto !important;
  max-width: none !important;
  max-height: 100% !important;
  min-width: 0 !important;
  object-fit: contain !important;
  object-position: left center !important;
  display: block;
  background: transparent;
}
.tl-clip .cut-name { font-size: .68rem; padding: 3px 0; white-space: nowrap; }
.tl-clip .tl-sec {
  position: absolute;
  right: 3px;
  bottom: 2px;
  z-index: 4;
  font-size: 10px;
  line-height: 1.1;
  color: #f3f3f3;
  text-shadow: 0 0 2px #000, 0 1px 2px #000;
  pointer-events: none;
  white-space: nowrap;
}
.scene-viewer {
  flex: 1;
  width: 100%;
  min-height: 220px;
  display: grid;
  background: #0c0d0e;
  overflow: hidden;
}
.scene-viewer[hidden] { display: none !important; }
.seq-stage { position: relative; }
.seq-cutno {
  position: absolute; left: 14px; bottom: 12px; z-index: 2;
  padding: 3px 9px; border-radius: 6px;
  background: rgba(12, 12, 12, .62); color: #f3f3f3;
  font-size: .9rem; font-weight: 700; letter-spacing: .02em; line-height: 1.3;
  pointer-events: none;
}
.seq-cutno[hidden] { display: none; }
.seq-blank {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  color: #6b6f75; font-size: .95rem; letter-spacing: .04em;
  pointer-events: none;
}
.seq-blank[hidden] { display: none; }
#cutFeed[hidden],
#workEmpty[hidden] { display: none !important; }
.work-scroll { position: relative; }
.scene-viewer:not([hidden]) {
  position: absolute;
  inset: 0;
  z-index: 6;
  min-height: 0;
  background: #0c0d0e;
}
.scene-viewer img, .scene-viewer video {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-width: none;
  max-height: none;
  object-fit: contain;
  object-position: center;
  display: block;
  background: transparent;
}
#sceneViewImg[hidden], #sceneViewVideo[hidden] { display: none !important; }
.work-scroll:has(#sceneViewer:not([hidden])) {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.drawer-pane {
  flex: 0 0 46px;
  width: 46px;
  flex-direction: row;
}
.drawer-pane.is-open {
  flex-basis: 340px;
  width: 340px;
}
.side-rail {
  width: 46px;
  flex: 0 0 46px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 0;
  background: #1a1c1e;
  border-right: 1px solid var(--line);
}
.rail-tab {
  border: 0;
  border-left: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  writing-mode: vertical-rl;
  padding: 12px 6px;
  cursor: pointer;
  font-size: .78rem;
  letter-spacing: .04em;
}
.rail-tab:hover { color: var(--ink-soft); }
.rail-tab.active { color: var(--accent); border-left-color: var(--accent); }
.drawer-pane.is-open .rail-tab.active { background: #22261c; }
.side-main { position: relative; flex: 1; min-width: 0; min-height: 0; display: none; flex-direction: column; }
.drawer-pane.is-open .side-main { display: flex; }
.side-main .tab-panels { flex: 1; min-height: 0; }

@media (max-width: 1100px) {
  .sb-workspace { display: flex; }
  .sb-workspace .pane { min-height: 0; }
}

.nav-pane .pane-h h2.is-editing { overflow: visible; }
.nav-rename {
  width: 100%; box-sizing: border-box; font: inherit; color: inherit;
  background: #121416; border: 1px solid var(--accent); border-radius: 4px; padding: 0 4px;
}
.cut-card .cut-media { position: relative; }
.cut-card .cut-media video { cursor: ew-resize; touch-action: pan-y; user-select: none; }
.cut-card .vid-bar {
  position: absolute; bottom: 0; left: 0; width: 100%; height: 3px; z-index: 2;
  background: rgba(255, 255, 255, .14); pointer-events: none;
  transition: height .12s ease;
}
.cut-card .vid-bar i {
  display: block; height: 100%; background: var(--accent);
  transform-origin: left center; transform: scaleX(0);
}
.cut-card .cut-media:hover .vid-bar, .cut-card .cut-media.is-scrub .vid-bar { height: 5px; }
.ver-pick {
  position: absolute; top: 8px; left: 8px; z-index: 3;
  width: 28px; height: 28px; padding: 0; border: 0; border-radius: 8px;
  display: grid; place-items: center;
  background: rgba(12, 12, 12, .55); color: #f3f3f3;
  cursor: pointer; font-size: 15px; line-height: 1;
  opacity: 0; pointer-events: none;
  transition: opacity .12s ease, background .12s ease, transform .12s ease;
}
.cut-card:hover .ver-pick,
.cut-card:focus-within .ver-pick,
.ver-pick:focus-visible {
  opacity: .42; pointer-events: auto;
}
.ver-pick.is-on,
.cut-card.is-picked .ver-pick {
  opacity: 1; pointer-events: auto;
  background: rgba(12, 12, 12, .82);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 70%, transparent);
}
.ver-pick:hover,
.ver-pick.is-on:hover {
  opacity: 1; background: rgba(20, 20, 20, .9); transform: scale(1.06);
}
.media-tovideo {
  position: absolute; top: 8px; left: 42px; z-index: 3;
  width: 28px; height: 28px; padding: 0; border: 0; border-radius: 8px;
  display: grid; place-items: center;
  background: rgba(12, 12, 12, .55); color: #f3f3f3;
  cursor: pointer; opacity: 0; pointer-events: none;
  transition: opacity .12s ease, background .12s ease, transform .12s ease, color .12s ease;
}
.media-tovideo svg { width: 15px; height: 15px; }
.cut-card:hover .media-tovideo,
.cut-card:focus-within .media-tovideo,
.media-tovideo:focus-visible {
  opacity: .72; pointer-events: auto;
}
.media-tovideo:hover {
  opacity: 1; background: rgba(20, 20, 20, .9); color: var(--accent); transform: scale(1.06);
}
.media-tovideo:disabled { opacity: .4; cursor: progress; }
.media-x {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  width: 28px; height: 28px; padding: 0; border: 0; border-radius: 8px;
  background: rgba(12, 12, 12, .72); color: #f3f3f3; cursor: pointer;
  opacity: 0; pointer-events: none; font-size: 18px; line-height: 28px;
}
.cut-card:hover .media-x, .cut-card:focus-within .media-x, .media-x:focus {
  opacity: 1; pointer-events: auto;
}
.media-x:hover { background: #8d2f2f; color: #fff; }
.media-tr {
  position: absolute; top: 42px; right: 8px; z-index: 2;
  width: 28px; height: 28px; padding: 0; border: 0; border-radius: 8px;
  display: grid; place-items: center;
  background: rgba(12, 12, 12, .72); color: #f3f3f3; cursor: pointer;
  opacity: 0; pointer-events: none;
}
.media-tr svg { width: 17px; height: 17px; display: block; }
.cut-card:hover .media-tr, .cut-card:focus-within .media-tr, .media-tr:focus,
.media-tr[aria-pressed="true"] { opacity: 1; pointer-events: auto; }
.media-tr:hover { background: #2c3035; }
.media-tr[aria-pressed="true"] { background: #22261c; color: var(--accent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 60%, transparent); }
.queue-toolbar { display: flex; justify-content: flex-end; padding: 0 2px 2px; }
.queue-toolbar .btn { font-size: .68rem; padding: 0 6px; line-height: 1.5; }
.queue-item { position: relative; }
.q-del {
  margin: 0; width: 16px; height: 16px; padding: 0; flex: 0 0 auto;
  border: 0; border-radius: 4px; background: transparent; color: var(--muted);
  cursor: pointer; font-size: 14px; line-height: 16px;
}
.q-del:hover { color: #fff; background: #8d2f2f; }
.q-bar {
  position: absolute; left: 4px; right: 4px; bottom: 1px; height: 3px;
  border-radius: 999px; background: #4a5158; overflow: hidden; pointer-events: none;
}
.q-bar[hidden] { display: none !important; }
.q-bar > span {
  display: block; height: 100%; width: 0; border-radius: inherit;
  background: var(--accent);
}
.q-bar.is-indet > span {
  width: 38%;
  animation: q-bar-slide 1.15s ease-in-out infinite;
}
@keyframes q-bar-slide {
  0% { transform: translateX(-130%); }
  100% { transform: translateX(340%); }
}
.prompt-resize {
  flex: 0 0 10px; height: 10px; margin: -10px -12px 0;
  cursor: ns-resize; position: relative; touch-action: none;
}
.prompt-resize::before {
  content: ""; position: absolute; left: 50%; top: 3px;
  width: 36px; height: 3px; margin-left: -18px; border-radius: 2px; background: #3a3f44;
}
.prompt-resize:hover::before, .prompt-resize.is-drag::before { background: var(--accent); }
body.is-prompt-resize, body.is-prompt-resize * { cursor: ns-resize !important; }
.prompt-box.is-sized {
  display: flex; flex-direction: column; overflow: hidden; min-height: 110px;
}
.prompt-box.is-sized textarea { flex: 1 1 auto; min-height: 40px; resize: none; }
.prompt-box.is-sized .prompt-foot { flex: 0 0 auto; }

.board-views {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  padding: 8px 12px 0;
  flex: 0 0 auto;
}
.board-views[hidden] { display: none !important; }

#cutLangBar { justify-content: flex-start; }
#btnImportCut { margin-right: auto; flex: 0 0 auto; }
#cutCrumb {
  display: flex;
  align-items: center;
  align-self: center;
  flex: 0 1 auto;
  min-width: 0;
  max-width: max(8rem, calc(100% - 13.5rem));
  margin-right: 8px;
  color: var(--muted);
  font-size: .75rem;
  line-height: 1.4;
  white-space: nowrap;
}
#cutCrumb[hidden] { display: none !important; }
.cut-crumb-lead, .cut-crumb-tail, .cut-crumb-num { flex: 0 0 auto; }
#cutCrumbName {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#btnImportCut[hidden] { display: none !important; }
.cut-back { flex: 0 0 auto; margin-right: 8px; color: var(--ink-soft); }
.cut-back:hover { color: var(--accent); border-color: var(--accent); }
.scene-card .scene-media { cursor: pointer; }
#btnImportCut:disabled { opacity: .55; cursor: default; }
.board-view {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: .75rem;
  line-height: 1.4;
  cursor: pointer;
}
.board-view.is-on {
  color: var(--accent);
  border-color: var(--accent);
}
.tl-sound { display: grid; place-items: center; padding: 2px 10px; }
.tl-sound svg { width: 16px; height: 16px; display: block; }
#boardViews { justify-content: flex-start; align-items: center; }
#boardViewCut:disabled { opacity: .4; cursor: default; }
.board-sep { flex: 0 0 1px; align-self: stretch; margin: 2px 4px; background: var(--line); }
.board-spacer { flex: 1 1 auto; }
.board-draw { color: #1b1d20; background: var(--accent); border-color: var(--accent); font-weight: 650; padding: 3px 12px; }
.board-draw:hover { filter: brightness(1.08); }
.board-draw:disabled { opacity: .5; cursor: default; filter: none; }
.board-draw.is-running { background: transparent; border-color: var(--danger); color: var(--danger); }
.board-draw-status { align-self: center; color: var(--muted); font-size: .75rem; }
.board-draw-status[hidden] { display: none !important; }
.board-play { font-weight: 650; padding: 3px 12px; }

.nav-list.is-scenes { padding: 4px 0; display: flex; flex-direction: column; }
.nav-scene {
  display: flex; align-items: center; gap: 6px; min-width: 0;
  padding: 5px 8px 5px 8px; border-left: 2px solid transparent; cursor: pointer;
}
.nav-scene:hover { background: rgba(255, 255, 255, .04); }
.nav-scene.is-on { border-left-color: var(--accent); background: rgba(255, 255, 255, .06); }
.nav-scene.drop-on, .nav-scene.drop-file { outline: 2px dashed var(--accent); outline-offset: -2px; }
.nav-scene-num { flex: 0 0 2.2em; font-size: .7rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.nav-scene.is-on .nav-scene-num { color: var(--accent); }
.nav-scene-name { flex: 1 1 auto; min-width: 0; font-size: .78rem; color: #d8d4cc; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-scene.is-on .nav-scene-name { color: #f3efe6; font-weight: 600; }
.nav-scene-sec { flex: 0 0 auto; font-size: .66rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.nav-st {
  flex: 0 0 2.6em; text-align: center; font-size: .72rem; line-height: 1.5;
  border-radius: 4px; font-variant-numeric: tabular-nums;
}
.nav-st-video { color: #8fd19e; }
.nav-st-image { color: #8ab4f8; }
.nav-st-sketch { color: #d6c8a4; }
.nav-st-empty { color: var(--muted); opacity: .6; }
.nav-st.is-unpicked { opacity: .45; }
.nav-st.is-run { color: #1b1d20; background: var(--accent); opacity: 1; font-size: .64rem; font-weight: 700; animation: navRun 1.6s ease-in-out infinite; }
@keyframes navRun { 50% { opacity: .55; } }
.nav-tabs {
  position: sticky; top: -4px; z-index: 2; display: flex; gap: 4px;
  padding: 4px 8px 6px; margin-bottom: 4px; background: var(--bg-soft);
}
.nav-tab {
  flex: 1 1 0; padding: 4px 0; border: 1px solid var(--line); border-radius: 5px;
  background: transparent; color: var(--muted); font: inherit; font-size: .76rem; cursor: pointer;
}
.nav-tab span { font-size: .68rem; opacity: .75; margin-left: 2px; }
.nav-tab.is-on { color: var(--accent); border-color: var(--accent); }
.nav-refs-head { padding: 0 8px 8px; display: flex; flex-direction: column; gap: 6px; }
.nav-refs-head p { margin: 0; font-size: .7rem; line-height: 1.45; color: var(--muted); }
.nav-refs-add { align-self: flex-start; }
.nav-refs-group { padding: 0 8px 10px; }
.nav-refs-title { margin: 0 0 5px; font-size: .7rem; font-weight: 700; color: var(--muted); }
.nav-refs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.nav-ref { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.nav-ref-pick {
  display: block; padding: 0; aspect-ratio: 1; border: 1px solid var(--line); border-radius: 5px;
  overflow: hidden; background: #0c0d0e; cursor: pointer;
}
.nav-ref-pick:hover { border-color: var(--accent); }
.nav-ref-pick img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nav-ref-name { font-size: .72rem; color: #d8d4cc; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-ref-row { display: flex; align-items: center; gap: 3px; }
.nav-ref-row .ref-role { flex: 1 1 auto; min-width: 0; font-size: .68rem; }
.nav-list.is-ref-drop { outline: 2px dashed var(--accent); outline-offset: -4px; }
.nav-scene-div {
  display: flex; align-items: center; gap: 6px; min-width: 0;
  margin-top: 8px; padding: 5px 8px 4px; border-top: 1px solid rgba(214, 200, 164, .35);
}
.nav-progress + .nav-scene-div { margin-top: 0; }
.nav-div-no { flex: 0 0 auto; font-size: .7rem; font-weight: 700; color: #d6c8a4; }
.nav-div-title {
  flex: 1 1 auto; min-width: 0; padding: 0; border: 0; background: none; text-align: left; cursor: pointer;
  font: inherit; font-size: .76rem; font-weight: 650; color: #e8e4dc;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nav-div-title:hover { color: var(--accent); }
.nav-div-sum { flex: 0 0 auto; font-size: .64rem; color: var(--muted); }
.nav-div-x {
  flex: 0 0 auto; padding: 0 5px; border: 1px solid transparent; border-radius: 4px;
  background: none; color: var(--muted); font: inherit; font-size: .68rem; line-height: 1.5; cursor: pointer; visibility: hidden;
}
.nav-scene-div:hover .nav-div-x { visibility: visible; }
.nav-div-x:hover { color: var(--accent); border-color: var(--accent); }
.nav-scene { position: relative; user-select: none; }
.nav-scene.in-scene { padding-left: 20px; }
.nav-scene.in-scene::before {
  content: ""; position: absolute; left: 11px; top: 0; bottom: 0; width: 1px; background: rgba(214, 200, 164, .35);
}
.nav-scene.is-folded { display: none; }
.nav-scene.is-sel { background: rgba(240, 195, 106, .14); }
.nav-scene.is-sel .nav-scene-name { color: #f3efe6; }
.nav-scene-div { cursor: pointer; user-select: none; }
.nav-scene-div:hover { background: rgba(255, 255, 255, .03); }
.nav-div-fold {
  flex: 0 0 auto; width: 1.2em; padding: 0; border: 0; background: none;
  color: #d6c8a4; font: inherit; font-size: .72rem; cursor: pointer;
}
.nav-div-title { cursor: text; }
.nav-selbar {
  position: sticky; top: 26px; z-index: 2; display: flex; align-items: center; gap: 6px;
  margin: 0 6px 6px; padding: 5px 6px; border: 1px solid var(--accent); border-radius: 6px; background: var(--bg-soft);
}
.nav-selbar[hidden] { display: none; }
.nav-sel-n { flex: 1 1 auto; font-size: .72rem; color: var(--accent); font-weight: 650; }
.nav-selbar .board-view { padding: 2px 8px; font-size: .7rem; }
.nav-sel-x { padding: 0 4px; border: 0; background: none; color: var(--muted); font: inherit; cursor: pointer; }
.nav-sel-x:hover { color: var(--accent); }
.tl-clip.tl-in-scene { border-top: 2px solid rgba(214, 200, 164, .55); }
.tl-clip.tl-scene-start { box-shadow: inset 3px 0 0 #d6c8a4; }
.tl-clip.tl-scene-start.is-play { box-shadow: inset 3px 0 0 #d6c8a4, inset 0 -3px 0 #f0c36a; }
.tl-scene-tag {
  position: absolute; left: 4px; top: 2px; z-index: 2; max-width: calc(100% - 8px);
  padding: 0 4px; border-radius: 3px; background: rgba(12, 12, 12, .72); color: #d6c8a4;
  font-size: .6rem; font-weight: 700; line-height: 1.5; pointer-events: none;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.scn-scene { width: 100%; box-sizing: border-box; font-size: .78rem; margin-bottom: 4px; opacity: .7; }
.scn-cut.has-scene { border-top: 2px solid #d6c8a4; padding-top: 6px; }
.scn-cut.has-scene .scn-scene { opacity: 1; color: #d6c8a4; font-weight: 650; }
.nav-progress {
  display: flex; flex-direction: column; gap: 5px;
  padding: 4px 8px 8px; margin-bottom: 4px; border-bottom: 1px solid var(--line);
}
.nav-progress-bar { display: flex; height: 4px; border-radius: 2px; overflow: hidden; background: rgba(255, 255, 255, .08); }
.nav-progress-bar .np-video { background: #8fd19e; }
.nav-progress-bar .np-image { background: #8ab4f8; }
.nav-progress-bar .np-sketch { background: #d6c8a4; }
.nav-progress-text { display: flex; flex-wrap: wrap; gap: 2px 8px; font-size: .68rem; color: var(--muted); }
.nav-progress-text b { font-weight: 600; }
.np-t-video { color: #8fd19e; }
.np-t-image { color: #8ab4f8; }
.np-t-sketch { color: #d6c8a4; }
.np-t-run { color: var(--accent); }
.np-t-pick { margin-left: auto; }
.nav-scene-empty { padding: 10px 6px; color: var(--muted); font-size: .78rem; }

.scene-viewer { position: relative; }
.play-exit {
  position: absolute; right: 12px; top: 12px; z-index: 3; display: none;
  padding: 4px 12px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, .25);
  background: rgba(12, 12, 12, .62); color: #f3f3f3; font-size: .8rem; cursor: pointer;
}
.play-exit:hover { border-color: var(--accent); color: var(--accent); }
body.is-playmode .play-exit { display: block; }
body.is-playmode .sb-top,
body.is-playmode .nav-pane,
body.is-playmode #sidePane,
body.is-playmode #boardViews,
body.is-playmode #cutLangBar,
body.is-playmode #jobForm { display: none !important; }
#boardViewCut,
#boardViewGrid,
#boardViewScene {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 4.75rem;
  height: 1.75rem;
  padding: 0 0.65rem;
  font-size: 0.75rem;
  line-height: 1.4;
  border-width: 1px;
  border-style: solid;
  white-space: nowrap;
}
.work-scroll:has(.cut-feed.is-board) {
  overflow-x: hidden;
  overflow-y: auto;
}
.cut-feed.is-board {
  position: relative;
  display: block;
  height: auto;
  min-height: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
.board-cell {
  position: absolute;
  margin: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #121416;
  border: 1px solid var(--line);
  cursor: pointer;
  user-select: none;
}
.board-cell.is-empty {
  background: #16181b;
  border-style: dashed;
  border-color: #3a4046;
}
.board-cell img,
.board-cell video {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
  display: block;
  pointer-events: none;
  background: #121416;
}
.board-num {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 1;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 6px;
  background: rgba(8, 8, 8, .72);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
  pointer-events: none;
}
.board-num.drag-handle { pointer-events: auto; }
.drag-handle { cursor: grab; touch-action: none; }
@keyframes just-moved { 0%, 60% { outline-color: var(--accent); } 100% { outline-color: transparent; } }
.board-cell.just-moved, .scene-card.just-moved, .cut-row.just-moved .cut-slide {
  outline: 3px solid transparent; outline-offset: -3px; animation: just-moved 1.6s ease-out;
}
.order-toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 1000;
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px;
  background: #1c1f22; color: var(--ink-soft); border: 1px solid var(--accent); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .45); font-size: .84rem;
}
.order-toast[hidden] { display: none; }
.order-toast-undo {
  border: 1px solid var(--accent); background: transparent; color: var(--accent); border-radius: 7px;
  padding: 4px 10px; font: inherit; font-size: .8rem; cursor: pointer;
}
.order-toast-undo:hover { background: var(--accent); color: #111; }
.order-toast-undo kbd { font: inherit; font-size: .68rem; opacity: .7; margin-left: 4px; }
.order-toast-x { border: 0; background: transparent; color: var(--muted); font-size: 1.1rem; cursor: pointer; padding: 0 6px; }
.drag-handle::before { content: "⠿"; margin-right: 3px; opacity: .55; font-weight: 400; }
.drag-handle:hover { color: var(--accent); }
.drag-handle:hover::before { opacity: 1; }
.board-num.drag-handle:hover { background: rgba(8, 8, 8, .9); box-shadow: 0 0 0 1px var(--accent); }
.is-dragging .drag-handle, .drag-handle:active { cursor: grabbing; }
.work-scroll:has(.cut-feed.is-scene) { overflow-x: hidden; overflow-y: auto; }
.cut-feed.is-scene {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 12px;
  height: auto;
  min-height: 0;
  box-sizing: border-box;
  justify-content: stretch;
  align-content: start;
}
.scene-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #1a1d20;
  cursor: default;
  user-select: none;
}
.board-cell img, .scene-media img, .cut-thumb img { -webkit-user-drag: none; user-drag: none; }
.board-cell.is-dragging,
.scene-card.is-dragging {
  opacity: .45;
  cursor: grabbing;
}
.scene-media {
  position: relative;
  background: #121416;
  overflow: hidden;
}
.scene-card.is-empty .scene-media { background: #16181b; }
.scene-media img,
.scene-media video {
  width: 100%;
  height: 100%;
  max-height: none;
  display: block;
  object-fit: cover;
  object-position: center;
  background: #121416;
  pointer-events: none;
}
.scene-media.is-portrait img,
.scene-media.is-portrait video {
  object-position: 50% 33.33%;
}
.scene-copy {
  box-sizing: border-box;
  min-height: 68px;
  padding: 6px 8px 8px;
  background: #1a1d20;
  cursor: text;
}
.scene-copy:not(.is-editing):hover { background: #1e2226; }
.scene-notes { margin: 6px 0 0; display: flex; flex-direction: column; gap: 3px; }
.scene-note { display: grid; grid-template-columns: 4.6em minmax(0, 1fr); gap: 6px; font-size: .74rem; line-height: 1.4; }
.scene-note dt { color: var(--accent); opacity: .85; }
.scene-note dd { margin: 0; color: var(--ink-soft); word-break: keep-all; overflow-wrap: anywhere; }
.scene-note-dialogue dd { font-style: italic; color: #e8dcc4; }
.scene-copy.is-editing { display: flex; flex-direction: column; gap: 5px; padding: 6px; }
.scene-note-edit { display: grid; grid-template-columns: 4.6em minmax(0, 1fr); gap: 6px; align-items: center; font-size: .74rem; }
.scene-note-edit span { color: var(--accent); }
.scene-note-edit input {
  width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 6px;
  background: #1a1c1e; color: var(--ink-soft); font: inherit; padding: 4px 6px;
}
.scene-note-edit input:focus { outline: none; border-color: var(--accent); }
.scene-desc {
  margin: 0;
  font-size: .78rem;
  line-height: 1.4;
  color: var(--ink-soft);
}
.scene-desc.is-empty { color: var(--muted); }

.project-item {
  flex-direction: row;
  align-items: center;
  gap: 0;
  padding: 0;
}
.project-item.is-on { border-color: var(--accent); }
.project-grip {
  flex: 0 0 18px;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 2px;
  border-radius: 6px;
  cursor: grab;
  touch-action: none;
}
.project-grip::before {
  content: "";
  width: 3px;
  height: 22px;
  border-left: 2px solid var(--muted);
  border-right: 2px solid var(--muted);
  opacity: .5;
}
.project-grip:hover { background: #2a2e32; }
.project-grip:hover::before { border-color: var(--accent); opacity: 1; }
.project-row.is-dragging .project-grip, .project-grip:active { cursor: grabbing; }
.project-open {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  padding: 8px 4px 8px 8px;
  cursor: pointer;
}
.project-go {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  margin-right: 8px;
  border: 0;
  border-radius: 999px;
  background: #111;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.project-go svg { width: 16px; height: 16px; display: block; }
.info-delete {
  position: absolute; z-index: 3; top: 14px; right: 14px;
  width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(12, 12, 12, .6); color: #f3f3f3;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  opacity: 0; pointer-events: none; transition: opacity .15s;
}
.info-delete svg { width: 16px; height: 16px; display: block; }
.project-info:hover .info-delete,
.info-delete:focus-visible { opacity: 1; pointer-events: auto; }
.info-delete:hover { background: #8d2f2f; color: #fff; }
.project-go:hover { background: #2a2a2a; }
.cut-feed.is-info {
  padding: 0;
  gap: 0;
}
.project-info {
  list-style: none;
  width: 100%;
  margin: 0;
  padding: 0 0 40px;
  display: flex;
  flex-direction: column;
  gap: 0;
  box-sizing: border-box;
}
.info-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 220px;
  max-height: min(64vh, 680px);
  background: #101114;
  overflow: hidden;
}
.info-hero-media,
.info-hero-media img,
.info-hero-media video,
.info-hero-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.info-hero-media img,
.info-hero-media video {
  object-fit: cover;
  object-position: 50% 50%;
  display: block;
}
.info-hero-media.is-portrait img,
.info-hero-media.is-portrait video {
  object-position: 50% 33.33%;
}
.info-hero-placeholder {
  background:
    radial-gradient(ellipse at 28% 18%, #2c3136 0%, transparent 52%),
    linear-gradient(165deg, #1c2024 0%, #0d0e10 100%);
}
.info-hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(12, 13, 15, .9) 0%, rgba(12, 13, 15, .35) 22%, rgba(12, 13, 15, 0) 40%);
  pointer-events: none;
}
.info-hero-copy {
  position: absolute;
  z-index: 1;
  left: 28px;
  right: 156px;
  bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.info-title,
.info-logline,
.info-synopsis textarea,
.info-chip input {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 0;
  box-sizing: border-box;
}
.info-title {
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -.02em;
  color: #f6f3ec;
  line-height: 1.15;
}
.info-logline {
  font-size: .98rem;
  color: #ddd6c8;
  line-height: 1.4;
}
.info-title::placeholder,
.info-logline::placeholder { color: rgba(255, 255, 255, .42); }
.info-title:focus,
.info-logline:focus,
.info-synopsis textarea:focus,
.info-chip input:focus {
  outline: none;
  box-shadow: inset 0 -1px 0 rgba(196, 165, 116, .75);
}
.info-go {
  position: absolute;
  z-index: 2;
  right: 20px;
  bottom: 24px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 44px;
  padding: 0 14px 0 10px;
  border: 0;
  border-radius: 999px;
  background: #f4f1ea;
  color: #161616;
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
}
.info-go svg { width: 18px; height: 18px; display: block; }
.info-go:hover { background: #fff; }
.info-body {
  padding: 22px 28px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 760px;
}
.info-synopsis span {
  display: block;
  margin-bottom: 8px;
  font-size: .72rem;
  letter-spacing: .08em;
  color: var(--muted);
}
.info-synopsis textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.55;
  color: var(--ink-soft);
}
.info-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.info-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  border-radius: 999px;
  background: #262a2e;
  padding: 5px 12px;
}
.info-chip input {
  width: 8ch;
  min-width: 4ch;
  max-width: 24ch;
  field-sizing: content;
  font-size: .82rem;
  color: #eee;
}
.info-chip input::placeholder { color: #8a8478; }
.create-dialog { max-width: 440px; }
.create-dialog .dialog-body label input,
.create-dialog .dialog-body textarea { width: 100%; }
.create-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.create-dialog .create-chips input {
  width: auto;
  min-width: 4.5em;
  field-sizing: content;
  border-radius: 999px;
  padding: 7px 12px;
}
.create-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
@media (max-width: 980px) {
  .info-hero-copy { left: 18px; right: 18px; bottom: 72px; }
  .info-go { right: 16px; bottom: 16px; }
  .info-body { padding: 18px 18px 0; }
}

.cut-feed.is-home {
  padding: 0;
  gap: 0;
}
.home-screen {
  list-style: none;
  width: 100%;
  margin: 0;
  padding: 28px 28px 48px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  box-sizing: border-box;
}
.home-kicker {
  margin: 0 0 6px;
  font-size: .72rem;
  letter-spacing: .14em;
  color: var(--accent);
}
.home-lead h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -.02em;
  color: #f6f3ec;
}
.home-date {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: .88rem;
}
.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, .78fr);
  gap: 12px;
  align-items: start;
}
.home-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #1e2124;
  padding: 16px 16px 6px;
}
.home-card h3 {
  margin: 0 0 4px;
  font-size: .78rem;
  letter-spacing: .08em;
  font-weight: 650;
  color: var(--accent);
}
.home-birth {
  grid-column: 2;
  grid-row: 1 / span 2;
  padding-bottom: 16px;
  background:
    radial-gradient(ellipse at 82% 0%, rgba(196, 165, 116, .18), transparent 56%),
    #1e2124;
}
.home-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.home-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  font-size: .88rem;
  line-height: 1.45;
  color: var(--ink-soft);
}
.home-sample {
  flex: 0 0 auto;
  margin-top: 3px;
  font-size: .68rem;
  letter-spacing: .04em;
  color: #1a1c1e;
  background: var(--accent);
  border-radius: 999px;
  padding: 1px 6px;
}
.home-empty {
  margin: 8px 0 4px;
  font-size: .98rem;
  color: #f6f3ec;
}
.home-note {
  margin: 0 0 14px;
  font-size: .82rem;
  line-height: 1.45;
  color: var(--muted);
}
.home-birth-name {
  margin: 8px 0 2px;
  font-size: 1.05rem;
  font-weight: 650;
  color: #f6f3ec;
}
.home-birth-date-line {
  margin: 0 0 6px;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--accent);
}
.home-birth-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.home-birth-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #141618;
  color: var(--ink-soft);
  padding: 8px 10px;
  box-sizing: border-box;
}
.home-birth-date { display: flex; gap: 8px; }
.home-birth-err { color: var(--danger); font-size: .8rem; margin: 0; }
@media (max-width: 820px) {
  .home-grid { grid-template-columns: 1fr; }
  .home-birth { grid-column: auto; grid-row: auto; }
  .home-screen { padding: 18px 16px 36px; }
}

/* click-to-play video thumbnails (left nav / grid / scene) */
.cut-thumb.has-video-thumb { cursor: pointer; }
.has-video-thumb::after {
  content: "";
  position: absolute;
  right: 7px;
  bottom: 7px;
  z-index: 1;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent rgba(255, 255, 255, .85);
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, .8));
  pointer-events: none;
}
.has-video-thumb.is-playing::after { display: none; }

.scenario-count { color: var(--muted); font-size: .75rem; }
.scenario-status { color: var(--accent); font-size: .8rem; }
.scenario-status:empty { display: none; }
#btnScenarioCancel[hidden] { display: none !important; }
#scenarioForm .prompt-box:not(.is-sized) textarea { max-height: 30vh; }
.scn-wrap { display: flex; flex-direction: column; gap: 14px; max-width: 860px; width: 100%; margin: 0; }
.scn-wrap input, .scn-wrap textarea {
  width: 100%; box-sizing: border-box;
  border: 1px solid var(--line); border-radius: 8px;
  background: #1a1c1e; color: var(--ink-soft);
  padding: 7px 9px; font: inherit; font-size: .88rem;
}
.scn-wrap input:focus, .scn-wrap textarea:focus { outline: none; border-color: var(--accent); }
.scn-wrap textarea { resize: vertical; line-height: 1.5; }
.scn-head { display: flex; flex-direction: column; gap: 8px; }
.scn-head .scn-title { font-size: 1.15rem; font-weight: 600; color: var(--accent); }
.scn-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.scn-cuts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.scn-cut {
  display: grid; grid-template-columns: 38px minmax(0, 1fr) 28px; gap: 8px; align-items: start;
  border: 1px solid var(--line); border-radius: 10px; background: #1e2124; padding: 8px;
}
.scn-num { color: var(--muted); font-size: .85rem; padding-top: 8px; text-align: center; }
.scn-cut-body { display: flex; flex-direction: column; gap: 6px; }
.scn-cut-body .scn-name { font-weight: 600; }
.scn-cut-top { display: flex; gap: 8px; align-items: center; }
.scn-cut-top .scn-name { flex: 1 1 auto; min-width: 0; }
.scn-sec { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; color: var(--muted); }
.scn-wrap .scn-sec input { width: 4.4em; padding: 5px 6px; font-size: .82rem; text-align: right; }
.scn-sec.is-long span { color: var(--accent); }
.scn-wrap .scn-sec.is-warn input { border-color: #c8553d; }
.scn-sec.is-warn span { color: #e07a5f; }
.scn-total { margin: 4px 2px 8px; font-size: .78rem; color: var(--muted); }
.scn-notes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.scn-note { display: grid; grid-template-columns: 4.6em minmax(0, 1fr); gap: 6px; align-items: center; }
.scn-note span { color: var(--accent); font-size: .78rem; }
.scn-wrap .scn-note input { padding: 5px 8px; font-size: .82rem; }
.scn-del {
  width: 28px; height: 28px; border: 0; border-radius: 50%;
  background: transparent; color: var(--muted); cursor: pointer; font-size: 1.1rem;
}
.scn-del:hover { background: #2a2e32; color: var(--danger); }
.scn-num { cursor: grab; user-select: none; }
.scn-cut.is-dragging { opacity: .45; }
.scn-cut.drop-on { border-color: var(--accent); background: #22261c; }
.drop-file { outline: 2px dashed var(--accent); outline-offset: -3px; }
.scene-card.drop-file, .cut-slide.drop-file, .scene-card.is-uploading, .cut-slide.is-uploading { position: relative; }
.board-cell.drop-file::after, .scene-card.drop-file::after, .cut-slide.drop-file::after,
.is-uploading::after {
  content: "여기에 놓으면 이 컷에 넣기";
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  z-index: 5; pointer-events: none; white-space: nowrap;
  background: rgba(14, 16, 18, .88); color: var(--accent); border: 1px solid var(--accent);
  border-radius: 999px; padding: 4px 10px; font-size: .74rem;
}
.is-uploading::after { content: attr(data-uploading); }
#workScroll.is-uploading { position: relative; }
.cut-card.reel-new.is-uploading { position: relative; }
#workScroll.is-uploading::after { position: sticky; display: block; width: max-content; margin: 8px auto; transform: none; left: auto; top: 8px; }
.cut-prompt-add {
  align-self: flex-start; margin: 10px 12px 6px; border: 1px dashed var(--line); background: transparent;
  color: var(--accent); border-radius: 8px; padding: 6px 10px; font: inherit; font-size: .8rem; cursor: pointer;
}
.cut-prompt-add:hover { border-color: var(--accent); }
.cut-prompt-edit-btn {
  align-self: flex-start; margin: 0 12px 6px; border: 0; background: transparent; color: var(--ink-soft);
  opacity: .7; font: inherit; font-size: .72rem; cursor: pointer; padding: 2px 0;
}
.cut-prompt-edit-btn:hover { color: var(--accent); opacity: 1; }
.cut-prompt-editor {
  margin: 10px 12px 6px; width: calc(100% - 24px); box-sizing: border-box; resize: vertical; min-height: 90px;
  border: 1px solid var(--accent); border-radius: 8px; background: #1a1c1e; color: var(--ink-soft);
  font: inherit; font-size: .82rem; line-height: 1.45; padding: 8px 10px;
}
.cut-prompt-editor:focus { outline: none; }
.cut-prompt-editbar { display: flex; align-items: center; gap: 6px; margin: 0 12px 8px; }
.cut-prompt-hint { margin-right: auto; font-size: .7rem; color: var(--ink-soft); opacity: .7; }
.scn-cuts { gap: 0; }
.scn-gap { height: 10px; position: relative; }
.scn-gap button {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  opacity: 0; border: 1px dashed var(--accent); border-radius: 999px;
  background: #1a1c1e; color: var(--accent); font-size: .75rem; padding: 2px 10px; cursor: pointer;
  transition: opacity .12s;
}
.scn-gap:hover button, .scn-gap button:focus-visible { opacity: 1; z-index: 1; }
.scn-add {
  border: 1px dashed var(--line); border-radius: 10px; background: transparent;
  color: var(--muted); padding: 10px; cursor: pointer; font-size: .85rem;
}
.scn-add:hover { border-color: var(--accent); color: var(--accent); }
.scene-desc { cursor: text; }
.scene-copy:hover .scene-desc { color: var(--accent); }
.cut-board { flex: 0 0 auto; min-height: 0; padding: 10px 40px 10px 12px; border-bottom: 1px solid var(--line); }
.cut-board.is-editing { padding: 8px 40px 8px 10px; }
.cut-board .scene-desc { font-size: .9rem; line-height: 1.5; color: #e8e4dc; white-space: pre-wrap; }
.cut-board .scene-desc.is-empty { color: var(--muted); font-size: .8rem; }
.cut-board .scene-notes { margin-top: 8px; gap: 5px; }
.cut-board .scene-note, .cut-board .scene-note-edit { font-size: .8rem; }
.cut-board .scene-story-edit { font-size: .86rem; min-height: 72px; }
.cut-gen { display: flex; flex-direction: column; min-height: 0; }
.cut-gen > summary {
  flex: 0 0 auto; padding: 8px 12px; cursor: pointer; list-style: none;
  font-size: .72rem; color: var(--muted); user-select: none;
}
.cut-gen > summary::-webkit-details-marker { display: none; }
.cut-gen > summary::before { content: "▸ "; }
.cut-gen[open] > summary::before { content: "▾ "; }
.cut-gen > summary:hover { color: var(--accent); }
.cut-side:has(.cut-gen:not([open])) .media-tr { display: none; }
.scene-story-edit {
  width: 100%; box-sizing: border-box; resize: vertical; min-height: 54px;
  border: 1px solid var(--accent); border-radius: 6px; background: #1a1c1e;
  color: var(--ink-soft); font: inherit; font-size: .78rem; line-height: 1.4; padding: 4px 6px;
}
.scene-story-edit:focus { outline: none; }
.scn-actions { display: flex; justify-content: flex-end; gap: 8px; padding-bottom: 8px; }
.scn-actions .btn:disabled { opacity: .45; cursor: default; }

/* Phone: auto by viewport. Center workspace is the main screen. */
.phone-dock, .phone-scrim { display: none; }
@media (max-width: 820px) {
  html, body {
    height: 100%;
  }
  .sb-app {
    max-width: none;
    height: 100dvh;
    max-height: 100dvh;
    padding: 0;
    gap: 0;
    padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
  }
  .sb-top {
    flex: 0 0 auto;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    padding: 8px 12px;
  }
  .tag, .tok-detail { display: none; }
  .tokens { min-width: 0; padding: 4px 8px; }
  .tok-avail { font-size: 1rem; }
  .sb-workspace {
    position: relative;
    gap: 0;
    flex: 1 1 0;
    min-height: 0;
    height: auto;
  }
  .work-pane {
    border-radius: 0;
    border: 0;
    width: 100%;
    flex: 1 1 0 !important;
    min-height: 0;
    height: auto !important;
  }
  .work-scroll { flex: 1 1 0; min-height: 0; }
  .nav-pane,
  .drawer-pane,
  .drawer-pane.is-open {
    display: none;
    position: fixed;
    top: 0;
    bottom: calc(56px + env(safe-area-inset-bottom, 0px));
    z-index: 40;
    height: auto;
    min-height: 0;
    border-radius: 0;
    box-shadow: var(--shadow);
    flex: none !important;
  }
  .nav-pane {
    left: 0;
    width: min(86vw, 320px);
  }
  body.phone-nav .nav-pane { display: flex; }
  .drawer-pane,
  .drawer-pane.is-open {
    right: 0;
    left: auto;
    width: min(92vw, 360px) !important;
    flex-basis: auto !important;
    flex-direction: column;
  }
  body.phone-side .drawer-pane,
  body.phone-side .drawer-pane.is-open { display: flex; }
  .drawer-pane .side-rail {
    width: 100%;
    flex: 0 0 auto;
    flex-direction: row;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 0;
  }
  .rail-tab {
    writing-mode: horizontal-tb;
    flex: 1;
    padding: 12px 8px;
    border-left: 0;
    border-bottom: 2px solid transparent;
  }
  .rail-tab.active {
    border-left-color: transparent;
    border-bottom-color: var(--accent);
  }
  .drawer-pane .side-main { display: flex !important; }
  .phone-dock {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    height: calc(56px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: #16181a;
    border-top: 1px solid var(--line);
  }
  .phone-dock button {
    flex: 1;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: .82rem;
    cursor: pointer;
  }
  .phone-dock button.is-on { color: var(--accent); font-weight: 650; }
  .phone-scrim {
    display: none;
    position: fixed;
    inset: 0 0 calc(56px + env(safe-area-inset-bottom, 0px)) 0;
    background: rgba(0,0,0,.45);
    z-index: 35;
  }
  body.phone-nav .phone-scrim,
  body.phone-side .phone-scrim { display: block; }
  .cut-card { flex-direction: column; }
  .cut-card .cut-media { flex: 0 0 auto; }
  .cut-card img, .cut-card video {
    width: 100%;
    height: auto;
    max-height: 55vh;
  }
  .scene-media { min-height: 140px; }
  .cut-feed.is-board {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(42vw, 1fr));
    gap: 8px;
    padding: 12px;
    height: auto !important;
    min-height: 0;
  }
  .cut-feed.is-board .board-cell {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: auto !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
  }
  .board-cell img,
  .board-cell video,
  .scene-media img,
  .scene-media video {
    width: 100%;
    height: 100%;
    min-height: 96px;
    object-fit: cover;
  }
  .cut-side {
    width: auto;
    max-width: none;
    min-width: 0;
    flex: none;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .board-views { flex-wrap: wrap; }
  .pill { min-height: 36px; }
  #promptLang { padding: 8px 4px; font-size: .85rem; }
}

/* 컷 작업공간: 결과 세로 띠 (가운데 결과 + 위아래 살짝) */
.work-scroll:has(.cut-feed.is-reel) {
  scroll-snap-type: y mandatory;
  overscroll-behavior: contain;
}
.work-scroll:has(.cut-feed.is-reel):not(:has(#sceneViewer:not([hidden]))) {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 30px, #000 calc(100% - 30px), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 30px, #000 calc(100% - 30px), transparent 100%);
}
.cut-feed.is-reel {
  --reel-peek: 76px;
  padding: var(--reel-peek) 12px;
  gap: 14px;
}
.cut-feed.is-reel > .cut-card {
  flex: 0 0 auto;
  box-sizing: border-box;
  height: max(220px, calc(var(--reel-h, 70vh) - 2 * var(--reel-peek)));
  scroll-snap-align: center;
  scroll-snap-stop: always;
  opacity: .42;
  transform: scale(.965);
  transition: opacity .22s ease, transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.cut-feed.is-reel > .cut-card.is-reel-on {
  opacity: 1;
  transform: none;
  border-color: #e8e4dc;
  box-shadow: 0 0 0 2px #e8e4dc, 0 8px 28px rgba(0, 0, 0, .45);
}
.cut-feed.is-reel > .cut-card.is-reel-on.is-picked {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent), 0 8px 28px rgba(0, 0, 0, .45);
}
.cut-feed.is-reel > .cut-card:not(.is-reel-on) { cursor: pointer; }
.cut-feed.is-reel .cut-card .cut-media { min-height: 0; }
.cut-feed.is-reel .cut-card .cut-media img,
.cut-feed.is-reel .cut-card .cut-media video {
  height: 100%;
  max-height: 100%;
}
.cut-feed.is-reel .cut-side { min-height: 0; overflow-y: auto; }
@media (prefers-reduced-motion: reduce) {
  .cut-feed.is-reel > .cut-card { transition: none; }
}

/* one-line prompt bar (Grok-like floating card) */
#jobForm.prompt-bar {
  position: relative;
  z-index: 6;
  flex: 0 0 64px;
  height: 64px;
  max-height: none !important;
  overflow: visible;
  padding: 0;
  border-top: 0;
  background: transparent;
  gap: 0;
}
#jobForm.prompt-bar .prompt-box {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  height: auto !important;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px 4px 4px 6px;
  border: 1px solid #2f3337;
  border-radius: 24px;
  background: #1f2124;
  box-shadow: 0 10px 32px rgba(0, 0, 0, .5);
  overflow: visible;
}
#jobForm.prompt-bar .prompt-box.dropping { border-color: var(--accent); background: #22261c; }
#jobForm.prompt-bar .prompt-box > .err,
#jobForm.prompt-bar .prompt-box > .empty-hint { margin: 6px 12px 0; font-size: .78rem; }
#jobForm.prompt-bar .prompt-refs {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0;
  margin: 0 4px 0 0;
  padding-left: 2px;
}
#jobForm.prompt-bar .prompt-refs[hidden] { display: none; }
.ref-thumb {
  position: relative;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 2px solid #1f2124;
  border-radius: 9px;
  overflow: hidden;
  background: #111;
  cursor: zoom-in;
  flex: 0 0 auto;
  transition: transform .16s ease, box-shadow .16s ease;
}
.ref-thumb + .ref-thumb { margin-left: -11px; }
.ref-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.ref-thumb:hover,
.ref-thumb:focus-visible {
  z-index: 3;
  transform: translateY(-2px) scale(1.12);
  box-shadow: 0 0 0 1.5px var(--accent), 0 6px 14px rgba(0, 0, 0, .45);
  outline: none;
}
.ref-thumb.over { box-shadow: 0 0 0 2px var(--accent); }
.prompt-bar .plus-btn:disabled { opacity: .35; cursor: default; background: transparent; }
@media (prefers-reduced-motion: reduce) {
  .ref-thumb { transition: none; }
}
.ref-view-dialog {
  max-width: 94vw;
  max-height: 94vh;
  padding: 0;
  border: 1px solid #2f3337;
  border-radius: 16px;
  background: #1a1c1e;
  color: var(--text);
  overflow: hidden;
}
.ref-view-dialog::backdrop { background: rgba(0, 0, 0, .62); }
.ref-view-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.ref-view-bar strong { font-size: .9rem; color: #e8e4dc; }
.ref-view-size { margin-right: auto; font-size: .76rem; color: var(--muted); }
.ref-view-bar select { width: auto; min-width: 0; flex: 0 0 auto; padding: 4px 8px; font-size: .78rem; }
.ref-view-stage {
  display: grid;
  place-items: center;
  max-width: 94vw;
  max-height: calc(94vh - 52px);
  overflow: auto;
  background: #0f1011;
}
.ref-view-stage img {
  display: block;
  max-width: 94vw;
  max-height: calc(94vh - 52px);
  cursor: zoom-in;
}
.ref-view-stage img.is-full { max-width: none; max-height: none; cursor: zoom-out; }
.prompt-bar .prompt-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.prompt-bar .prompt-input { flex: 1 1 160px; min-width: 0; display: flex; }
#jobForm.prompt-bar .prompt-input textarea {
  width: 100%;
  height: 36px;
  min-height: 0;
  padding: 8px 8px;
  border: 0;
  background: transparent;
  line-height: 20px;
  font-size: .92rem;
  color: var(--ink-soft);
  resize: none;
  overflow: hidden;
  outline: none;
}
.prompt-bar .prompt-gap { display: none; }
.prompt-bar .is-multi .prompt-input { order: -1; flex-basis: 100%; }
#jobForm.prompt-bar .is-multi .prompt-input textarea { padding: 10px 12px 4px; }
.prompt-bar .is-multi .prompt-gap { display: block; flex: 1 1 auto; }
#jobForm.prompt-bar .is-idle .prompt-input textarea { white-space: nowrap; overflow: hidden; }
.prompt-bar .plus-btn { width: 34px; height: 34px; border: 0; background: transparent; font-size: 1.35rem; color: var(--muted); }
.prompt-bar .plus-btn:hover { background: #2a2d31; color: var(--ink-soft); }
.prompt-bar .prompt-lang { flex: 0 0 auto; }
.prompt-bar .rewrite-btn {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--accent);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.prompt-bar .rewrite-btn svg { width: 19px; height: 19px; display: block; }
.prompt-bar .rewrite-btn:hover { background: #2a2d31; }
.prompt-bar .rewrite-btn.is-busy svg { animation: rewrite-spin 1.1s linear infinite; }
@keyframes rewrite-spin { to { transform: rotate(360deg); } }
.prompt-bar .kind-pills { flex: 0 0 auto; padding: 3px; background: #15171a; }
.prompt-bar .kind-pills .pill { padding: 5px 10px; color: var(--muted); }
.prompt-bar .kind-pills .pill svg { width: 18px; height: 18px; display: block; }
.prompt-bar .kind-pills .pill:has(input:checked) { background: #2c3035; color: #f0ede6; }
.prompt-bar .kind-pills .pill:has(input:focus-visible) { outline: 1px solid var(--accent); }
.opt-wrap { position: relative; flex: 0 1 auto; min-width: 0; }
.opt-btn { max-width: 240px; min-width: 0; border: 0; background: transparent; color: var(--ink-soft); }
.opt-btn:hover, .opt-btn[aria-expanded="true"] { background: #2a2d31; }
.opt-btn .prompt-summary { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opt-btn .chev { font-size: .7rem; opacity: .7; }
.opt-panel {
  position: absolute;
  right: -40px;
  bottom: calc(100% + 14px);
  width: 340px;
  max-width: calc(100vw - 32px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border: 1px solid #2f3337;
  border-radius: 18px;
  background: #1f2124;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .55);
  z-index: 30;
}
.opt-panel[hidden] { display: none !important; }
.opt-title { margin: 0; font-size: .8rem; color: #e8e4dc; }
.opt-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.opt-line[hidden] { display: none !important; }
.opt-name { flex: 0 0 64px; font-size: .76rem; color: var(--muted); }
.opt-panel .model-pill { max-width: 240px; }
.opt-panel .omni-bar { margin: 0; padding: 10px 0 0; border-bottom: 0; border-top: 1px solid var(--line); }
.opt-panel .cost-line { margin: 0; padding-top: 8px; border-top: 1px solid var(--line); font-size: .8rem; }
.prompt-bar .send-btn { flex: 0 0 auto; }

/* glass: blur lives on ::after so fixed sub-menus inside keep viewport positioning */
#jobForm.prompt-bar .prompt-box,
.opt-panel {
  background: transparent;
  isolation: isolate;
  border-color: rgba(255, 255, 255, .08);
  border-top-color: rgba(255, 255, 255, .16);
}
#jobForm.prompt-bar .prompt-box::after,
.opt-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  backdrop-filter: blur(14px) saturate(1.15);
}
#jobForm.prompt-bar .prompt-box::after {
  background: linear-gradient(to top, rgba(31, 33, 36, .5), rgba(31, 33, 36, .2));
}
.opt-panel::after { background: rgba(31, 33, 36, .86); }
#jobForm.prompt-bar .prompt-box.dropping::after { background: rgba(34, 38, 28, .94); }
@media (prefers-reduced-transparency: reduce) {
  #jobForm.prompt-bar .prompt-box::after,
  .opt-panel::after {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: #1f2124;
  }
}

.cut-card.reel-new {
  border: 1px dashed #3a4046;
  background: #16191b;
  align-items: center;
  justify-content: center;
}
.cut-card.reel-new { align-items: stretch; }
.reel-new-main {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.reel-new-side { cursor: default; }
.reel-new-side[hidden] { display: none; }
.cut-card.reel-new.is-reel-on { cursor: text; }
.cut-card.reel-new.is-running { border-style: solid; border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.reel-new-body {
  width: min(460px, 86%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  color: var(--muted);
}
.reel-new-title { margin: 0; font-size: 1.05rem; color: #e8e4dc; }
.reel-new-more { font-size: .78rem; color: var(--muted); }
.reel-new-sub { margin: 0; font-size: .8rem; line-height: 1.55; }
.reel-new-prompt {
  margin: 0;
  font-size: .74rem;
  line-height: 1.5;
  opacity: .75;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.reel-new-bar {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #24292d;
  overflow: hidden;
}
.reel-new-bar > span {
  display: block;
  height: 100%;
  background: var(--accent);
  transition: width .35s ease;
}
.reel-new-acts { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
.reel-new-acts .board-view { cursor: pointer; }
.reel-new-draft {
  flex: 0 0 auto; width: 96px; height: 54px; padding: 0;
  border: 1px solid var(--line); border-radius: 6px; overflow: hidden;
  background: #fff; cursor: pointer;
}
.reel-new-draft img { width: 100%; height: 100%; object-fit: contain; display: block; }
.reel-new-draft:hover { border-color: var(--accent); }

.cut-card.reel-new.is-sketching {
  position: relative;
  padding: 0;
  border-style: solid;
  cursor: default;
}
.cut-card.reel-new.is-sketching .reel-new-body { display: none; }
.sketch-panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: #1b1d20;
  color: #e8e4dc;
  outline: none;
}
.sketch-bar, .sketch-foot {
  flex: 0 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px;
  padding: 7px 10px; background: #202327;
}
.sketch-bar { border-bottom: 1px solid var(--line); }
.sketch-foot { border-top: 1px solid var(--line); }
.sketch-group { display: flex; align-items: center; gap: 4px; }
.sketch-close { margin-left: auto; }
.sketch-tool {
  padding: 5px 12px; border: 1px solid var(--line); border-radius: 7px;
  background: transparent; color: inherit; font-size: .8rem; cursor: pointer;
}
.sketch-tool.is-on { background: color-mix(in srgb, var(--accent) 22%, transparent); border-color: var(--accent); }
.sketch-color {
  width: 22px; height: 22px; padding: 0; border-radius: 50%;
  border: 2px solid #3a4046; background: var(--c); cursor: pointer;
}
.sketch-color.is-on { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(0, 0, 0, .5) inset; transform: scale(1.12); }
.sketch-pick { width: 28px; height: 24px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.sketch-size { display: flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--muted); }
.sketch-size input { width: 120px; }
.sketch-size b { min-width: 20px; color: inherit; font-weight: 600; }
.sketch-stage {
  flex: 1 1 auto; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 8px; background: #2a2d31; overflow: hidden;
}
.sketch-canvas {
  max-width: 100%; max-height: 100%;
  background: #fff; box-shadow: 0 4px 24px rgba(0, 0, 0, .45);
  cursor: crosshair; touch-action: none;
}
.sketch-canvas.is-eraser { cursor: cell; }
.sketch-note {
  flex: 1 1 320px; min-width: 0;
  padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: #15171a; color: inherit; font-size: .88rem;
}
