/* app.css: the interface, SketchReel's design system. Dark by default: near-black grounds that let a film's own colours
   read true, hairline borders instead of boxes, three steps of text, one violet accent for what is chosen, focused or
   moving, and white for the one main action on a screen (after Vercel, Linear and Notion). Geist for words, Geist Mono
   for numbers and times. Sizes keep to a 4 px grid. Tokens first, then components, then each window. */
@font-face { font-family: Geist; font-style: normal; font-weight: 100 900; font-display: block; src: url(fonts/Geist.woff2) format('woff2'); }
@font-face { font-family: 'Geist Mono'; font-style: normal; font-weight: 100 900; font-display: block; src: url(fonts/GeistMono.woff2) format('woff2'); }
:root {
  color-scheme: dark;
  /* grounds, deepest first: the window, the editor's stage, panels and cards, menus and sheets, controls on them */
  --app: #09090b; --canvas: #0c0c0e; --panel: #111113; --raised: #17171a; --raised2: #1f1f23; --well: #0d0d10;
  --hover: rgba(255, 255, 255, .05); --press: rgba(255, 255, 255, .08);
  --line: rgba(255, 255, 255, .07); --line2: rgba(255, 255, 255, .1); --line3: rgba(255, 255, 255, .16);
  /* text: what is read, what supports it, what only labels */
  --text: #ededef; --soft: #a1a1aa; --faint: #71717a; --ghost: #52525b;
  --accent: #7c6dfa; --accent-strong: #6b5cf0; --accent-text: #b0a8ff; --accent-soft: rgba(124, 109, 250, .14); --accent-line: rgba(124, 109, 250, .55);
  --sel: #7c6dfa; --red: #f24822;
  --ai: linear-gradient(90deg, #8f84ff, #b0a8ff);
  --ok: #4ade80; --warn: #fbbf24; --danger: #f87171;
  --r-xs: 4px; --r-sm: 6px; --r: 8px; --r-lg: 10px; --r-xl: 14px;
  --shadow-pop: 0 0 0 1px rgba(255, 255, 255, .08), 0 12px 32px rgba(0, 0, 0, .55);
  --shadow-panel: 0 0 0 1px rgba(255, 255, 255, .06), 0 8px 24px rgba(0, 0, 0, .35);
  --shadow-sheet: 0 0 0 1px rgba(255, 255, 255, .08), 0 32px 96px rgba(0, 0, 0, .7);
  --ease: cubic-bezier(.2, .8, .2, 1); --fast: 120ms; --med: 200ms;
  --sans: Geist, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --display: var(--sans);
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}
* { box-sizing: border-box; }
#app { height: 100%; }
html, body { margin: 0; height: 100%; background: var(--app); color: var(--text); font: 13px/1.5 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
::selection { background: rgba(124, 109, 250, .35); }
code { font: 11.5px var(--mono); color: var(--text); background: var(--raised2); padding: 1px 5px; border-radius: 4px; border: 1px solid var(--line); }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; font-family: var(--display); }
a { color: var(--accent-text); text-decoration: none; } a:hover { text-decoration: underline; text-underline-offset: 2px; }
kbd, .kbd { font: 11px var(--mono); color: var(--faint); padding: 1px 5px; border-radius: 4px; border: 1px solid var(--line2); background: transparent; white-space: nowrap; }
.grow { flex: 1; }
.soft { color: var(--soft); } .mono { font-family: var(--mono); font-size: 11.5px; }
.error { color: var(--danger); } .ok { color: var(--ok); display: inline-flex; gap: 6px; align-items: center; } .warn { color: var(--warn); }
.hint { color: var(--faint); margin: 8px 0; line-height: 1.5; font-size: 12px; } .hint.center { text-align: center; }
.ico { flex: none; display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .08); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 255, 255, .16); } ::-webkit-scrollbar-corner { background: none; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; } }

/* tooltips: a small dark label with its shortcut, after a beat */
[data-tip] { position: relative; }
[data-tip]::after { content: attr(data-tip); position: absolute; left: 50%; top: calc(100% + 8px); transform: translate(-50%, -2px); z-index: 90; pointer-events: none; white-space: pre;
  background: #1f1f23; color: var(--text); font: 500 12px/1 var(--sans); padding: 6px 8px; border-radius: 6px; box-shadow: var(--shadow-pop);
  opacity: 0; transition: opacity var(--fast), transform var(--fast); transition-delay: 0s; }
[data-tip]:hover::after { opacity: 1; transform: translate(-50%, 0); transition-delay: .45s; }
.bottombar [data-tip]::after { top: auto; bottom: calc(100% + 10px); }
[data-tip]:disabled::after, .menu [data-tip]::after { display: none; }

/* ---------- buttons, fields, controls ---------- */
/* buttons: secondary by default; .primary is the one main action (white); .ghost sits in a bar; heights 28 / 32 / 36 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--line2); background: var(--raised2); color: var(--text); font-weight: 500; white-space: nowrap; transition: background var(--fast), border-color var(--fast), color var(--fast); }
.btn:hover { background: #27272c; border-color: var(--line3); } .btn:active { background: #2c2c32; }
.btn:disabled { opacity: .45; cursor: default; }
.btn .ico { color: var(--soft); } .btn:hover .ico { color: var(--text); }
.btn.primary { background: #ededef; border-color: transparent; color: #09090b; } .btn.primary .ico { color: #09090b; }
.btn.primary:hover { background: #fff; } .btn.primary:disabled { background: #ededef; }
.btn.ai .ico { color: var(--accent-text); }
.btn.sm { height: 26px; padding: 0 9px; font-size: 12px; border-radius: 5px; } .btn.lg { height: 36px; padding: 0 16px; font-size: 13.5px; border-radius: var(--r); }
.btn.ghost { background: none; border-color: transparent; color: var(--soft); } .btn.ghost:hover { background: var(--hover); color: var(--text); }
.btn.danger { color: var(--danger); }
.icon-btn { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: var(--r-sm); border: 0; background: none; color: var(--soft); transition: background var(--fast), color var(--fast); }
.icon-btn:hover { background: var(--hover); color: var(--text); } .icon-btn.on { background: var(--accent-soft); color: var(--accent-text); }
.icon-btn.sm { width: 24px; height: 24px; border-radius: 5px; }
.icon-btn:disabled { opacity: .3; cursor: default; background: none; }
.link { border: 0; background: none; color: var(--accent-text); padding: 0; display: inline-flex; gap: 4px; align-items: center; } .link:hover { text-decoration: underline; text-underline-offset: 2px; } .link.small { font-size: 12px; margin-top: 6px; } .link.shoot { display: flex; margin: 8px 12px 0; }
.input { width: 100%; min-height: 32px; background: var(--well); border: 1px solid var(--line2); border-radius: var(--r-sm); padding: 6px 10px; outline: none; transition: border-color var(--fast), box-shadow var(--fast); }
.input::placeholder { color: var(--faint); } .input:hover { border-color: var(--line3); }
.input:focus { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.input.sm { min-height: 26px; padding: 3px 8px; border-radius: 5px; font-size: 12px; } .input.wide { font-size: 13.5px; padding: 9px 12px; }
.input.example { color: var(--soft); font-style: italic; } .input.tokenv { color: var(--accent-text); }
textarea.input { resize: vertical; line-height: 1.5; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--soft) 50%), linear-gradient(135deg, var(--soft) 50%, transparent 50%); background-position: calc(100% - 13px) 52%, calc(100% - 9px) 52%; background-size: 4px 4px; background-repeat: no-repeat; padding-right: 26px; }
/* segmented: one of a few, in a well */
.seg { display: inline-flex; background: var(--well); border: 1px solid var(--line); border-radius: var(--r); padding: 2px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 3px 10px; min-height: 24px; border-radius: 6px; color: var(--soft); font-size: 12px; font-weight: 500; transition: background var(--fast), color var(--fast); }
.seg button:hover { color: var(--text); } .seg button.on { background: var(--raised2); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .4), inset 0 0 0 1px var(--line); }
.seg button:disabled { opacity: .4; cursor: default; } .seg.plain button { text-transform: none; }
.seg button em { font-style: normal; color: var(--faint); font-family: var(--mono); font-size: 11px; margin-left: 4px; }
.fld > .seg { justify-self: start; }
.toggle { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 0; color: var(--soft); }
.toggle i { width: 28px; height: 16px; border-radius: 9px; background: var(--line3); position: relative; transition: background var(--fast); flex: none; }
.toggle i::after { content: ""; position: absolute; left: 2px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; transition: transform var(--med) var(--ease); box-shadow: 0 1px 2px rgba(0, 0, 0, .4); }
.toggle.on i { background: var(--accent); } .toggle.on i::after { transform: translateX(12px); }
.check { display: flex; align-items: center; gap: 8px; color: var(--soft); margin: 10px 0; } .check input { accent-color: var(--accent); }
.pill { white-space: nowrap; font-size: 12px; height: 26px; padding: 0 10px; border-radius: 99px; border: 1px solid var(--line2); color: var(--soft); display: inline-flex; align-items: center; gap: 7px; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--faint); } .pill.ok::before { background: var(--ok); } .pill.off::before { background: var(--warn); }
.pill.ok { color: var(--text); } .btnpill { cursor: pointer; background: none; font: inherit; font-size: 12px; transition: border-color var(--fast), background var(--fast); } .btnpill:hover { border-color: var(--line3); background: var(--hover); }
/* chips: a choice among several, or a tag */
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; height: 26px; padding: 0 10px; border-radius: 99px; background: none; border: 1px solid var(--line2); color: var(--soft); white-space: nowrap; transition: color var(--fast), border-color var(--fast), background var(--fast); }
button.chip:hover { color: var(--text); border-color: var(--line3); }
.chip.on, .chip.yours { color: var(--text); background: var(--accent-soft); border-color: var(--accent-line); }
.fmt-chips { display: flex; gap: 6px; flex-wrap: wrap; } .fmt-chips .chip { cursor: pointer; font-family: var(--mono); font-size: 11.5px; }
.chip.removable { display: inline-flex; align-items: center; gap: 4px; padding-right: 4px; max-width: 100%; } .chip.removable > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; } .chip.removable button { border: 0; background: none; color: var(--faint); width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; padding: 0; flex: none; } .chip.removable button:hover { background: var(--hover); color: var(--text); }
.na-feats > .soft { width: 100%; font-size: 12px; }
.row { display: flex; gap: 12px; align-items: center; margin-top: 12px; } .row.end { justify-content: flex-end; }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line2); border-top-color: var(--text); animation: spin .8s linear infinite; margin: 0 auto 14px; }
@keyframes spin { to { transform: rotate(360deg); } }
.sw { width: 18px; height: 18px; border-radius: 4px; border: 1px solid rgba(255, 255, 255, .14); padding: 0; flex: none; display: inline-block; }
.sw.big { width: 34px; height: 34px; border-radius: 8px; } .sw.pick { position: relative; display: inline-grid; place-items: center; background: var(--raised2); color: var(--soft); overflow: hidden; cursor: pointer; }
.sw.pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.progress { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; } .progress span { color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.progress .bar { width: 160px; height: 4px; border-radius: 4px; background: var(--line2); overflow: hidden; flex: none; } .progress .bar i { display: block; height: 100%; background: var(--accent); transition: width .3s var(--ease); }
.notice { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid rgba(251, 191, 36, .25); background: rgba(251, 191, 36, .06); border-radius: var(--r); margin-bottom: 14px; }
.notice .ico { color: var(--warn); } .notice span { flex: 1; }

/* ---------- menus, popovers, toasts ---------- */
.dd { position: relative; }
.menu { position: absolute; right: 0; top: 32px; z-index: 40; min-width: 220px; max-height: 62vh; overflow: auto; background: var(--raised); border-radius: var(--r-lg); padding: 4px; box-shadow: var(--shadow-pop); animation: pop var(--fast) var(--ease); transform-origin: top left; }
.menu.ctx { position: fixed; right: auto; top: 0; z-index: 85; min-width: 232px; }
@keyframes pop { from { opacity: 0; transform: scale(.98); } }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; height: 30px; border: 0; background: none; text-align: left; padding: 0 8px; border-radius: var(--r-sm); font-size: 13px; color: var(--text); }
.menu button .ico { color: var(--soft); }
.menu button:hover:not(:disabled), .menu button.on { background: var(--press); } .menu button:disabled { opacity: .4; cursor: default; }
.menu button.danger { color: var(--danger); } .menu button.danger .ico { color: var(--danger); } .menu button.danger:hover, .menu button.danger.on { background: rgba(248, 113, 113, .12); }
.menu button i { margin-left: auto; padding-left: 18px; font-style: normal; color: var(--faint); font: 11.5px var(--mono); max-width: 170px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 6px; }
.menu .ico-pad { width: 14px; flex: none; }
.menu-head { color: var(--faint); font-size: 12px; font-weight: 500; padding: 8px 8px 4px; }
.pop { position: absolute; top: 30px; left: 0; z-index: 60; width: 240px; background: var(--raised); border-radius: var(--r-lg); padding: 10px; box-shadow: var(--shadow-pop); animation: pop var(--fast) var(--ease); }
.pop.wide { width: 272px; } .pop-add { width: 100%; margin-top: 8px; justify-content: center; } .pop-title { color: var(--faint); font-size: 12px; font-weight: 500; margin: 2px 2px 8px; }
.pop .asset-grid { max-height: 300px; overflow: auto; grid-template-columns: repeat(4, 1fr); }
.pop-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; background: var(--raised); color: var(--text); padding: 10px 16px 10px 14px; border-radius: var(--r-lg); box-shadow: var(--shadow-pop); z-index: 95; animation: rise .28s var(--ease); max-width: 70vw; }
.toast::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; } .toast.error::before { background: var(--danger); }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 8px); } }

/* ---------- the colour picker ---------- */
.pop.cp-pop { width: 252px; padding: 0; }
.cp { display: grid; gap: 10px; padding: 10px 12px 12px; }
.cp-tabs { display: flex; gap: 4px; align-items: center; } .cp-tabs button { border: 0; background: none; color: var(--soft); font-weight: 600; font-size: 12px; padding: 3px 6px; border-radius: 5px; } .cp-tabs button.on { color: var(--text); background: var(--hover); }
.cp-token { margin-left: auto; font: 11px var(--mono); color: var(--accent-text); background: var(--accent-soft); padding: 2px 6px; border-radius: 4px; }
.cp-sv { position: relative; height: 150px; border-radius: 6px; cursor: crosshair; touch-action: none; background-image: linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, rgba(255, 255, 255, 0)) !important; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.cp-sv { background-blend-mode: normal; }
.cp-sv i { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; border: 2.5px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .35), 0 2px 6px rgba(0, 0, 0, .35); pointer-events: none; }
.cp-row { display: flex; gap: 8px; align-items: center; } .cp-eye { flex: none; }
.cp-sliders { flex: 1; display: grid; gap: 8px; }
.cp-hue, .cp-alpha { position: relative; height: 12px; border-radius: 6px; cursor: pointer; touch-action: none; }
.cp-hue { background: linear-gradient(90deg, #f00, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00); }
.cp-alpha { background: repeating-conic-gradient(#5a5a62 0 25%, #34343a 0 50%) 0 0 / 8px 8px; } .cp-alpha b { position: absolute; inset: 0; border-radius: 6px; }
.cp-hue i, .cp-alpha i { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; border: 2.5px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .3); pointer-events: none; overflow: hidden; }
.cp-alpha i s { position: absolute; inset: 0; }
.cp-fields { display: grid; grid-template-columns: auto 1fr 64px; gap: 6px; align-items: center; } .cp-fmt { color: var(--soft); font-size: 11.5px; padding: 0 2px; }
.cp-fields .input { text-transform: uppercase; }
.cp-title { color: var(--faint); font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-top: 2px; }
.cp-swatches { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; } .cp-swatches.named { grid-template-columns: 1fr 1fr; gap: 3px; max-height: 230px; overflow: auto; }
.cp-swatches button { border: 0; background: none; padding: 0; display: flex; align-items: center; gap: 7px; border-radius: 5px; color: var(--soft); font-size: 11px; }
.cp-swatches span { width: 22px; height: 22px; border-radius: 5px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15); flex: none; }
.cp-swatches.named button { padding: 3px; } .cp-swatches.named button:hover { background: var(--hover); color: var(--text); } .cp-swatches.named span { width: 18px; height: 18px; }
.cp-swatches button.on span { box-shadow: 0 0 0 2px var(--accent), inset 0 0 0 1px rgba(0, 0, 0, .3); } .cp-swatches em { font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-foot { display: flex; justify-content: flex-end; }

/* ---------- title bars (the traffic lights sit at the top left) ---------- */
.titlebar, .toolbar { height: 52px; display: flex; align-items: center; gap: 8px; padding: 0 14px 0 86px; border-bottom: 1px solid var(--line); background: var(--app); -webkit-app-region: drag; user-select: none; }
.titlebar button, .titlebar input, .toolbar button, .toolbar input, .toolbar .seg, .toolbar .dd, .titlebar .dd { -webkit-app-region: no-drag; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; letter-spacing: -.01em; }
.brand-mark { width: 22px; height: 22px; flex: none; display: block; }
.brand .mark, .mark { width: 22px; height: 22px; display: grid; place-items: center; flex: none; }
.mark img { width: 100%; height: 100%; display: block; } .mark.sm { width: 18px; height: 18px; }

/* ---------- sheets (dialogs) ---------- */
.sheet-back { position: fixed; inset: 0; background: rgba(0, 0, 0, .62); display: grid; place-items: center; z-index: 50; backdrop-filter: blur(4px); animation: fade var(--med) ease-out; }
@keyframes fade { from { opacity: 0; } }
.sheet { background: var(--raised); border-radius: var(--r-xl); box-shadow: var(--shadow-sheet); display: flex; flex-direction: column; max-height: 88vh; animation: sheet .26s var(--ease); overflow: hidden; }
@keyframes sheet { from { opacity: 0; transform: translateY(8px) scale(.985); } }
.sheet.small { width: 440px; padding: 24px; } .sheet.small h2 { font-size: 16px; margin-bottom: 6px; } .sheet.center { text-align: center; }
.sheet.mid { width: 660px; } .sheet.big { width: min(1100px, 93vw); height: 88vh; } .sheet.big.short { height: auto; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 16px 16px 20px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { font-size: 15px; display: flex; align-items: center; gap: 8px; } .sheet-head p { margin: 4px 0 0; line-height: 1.5; font-size: 13px; }
.sheet-head h2 .ico { color: var(--soft); }
.sheet-body { padding: 20px; overflow: auto; flex: 1; }
.sheet-foot { display: flex; align-items: center; gap: 10px; padding: 12px 16px 12px 20px; border-top: 1px solid var(--line); }
.sheet-foot > span { font-size: 12.5px; }
.fld { display: grid; gap: 8px; margin-bottom: 20px; } .fld:last-child { margin-bottom: 0; } .fld > span { color: var(--soft); font-size: 12px; font-weight: 500; }
.na-sec { padding: 16px 0 20px; border-bottom: 1px solid var(--line); } .na-sec:last-child { border-bottom: 0; }
.na-sec-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; } .na-sec-head h3 { font-size: 13px; }
.na-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; } .na-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; align-items: start; } .span2 { grid-column: span 2; }
.na-feats { display: flex; flex-wrap: wrap; gap: 6px; }
.na-roles { display: flex; gap: 10px; flex-wrap: wrap; }
.role { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 1px 9px; align-items: center; padding: 8px 10px 8px 8px; border-radius: 11px; border: 1px solid var(--line); background: var(--raised2); text-align: left; min-width: 150px; transition: border-color var(--fast); }
.role .sw { grid-row: span 2; } .role:hover { border-color: var(--line3); } .role.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; } .role-l { font-weight: 500; }
.hex { width: 84px; border: 0; background: none; padding: 0; color: var(--soft); font: 11px var(--mono); outline: none; }
.na-found { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.na-preview { border-radius: var(--r-lg); padding: 20px 22px; display: grid; gap: 6px; position: relative; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.na-preview b { font-size: 26px; letter-spacing: -.03em; font-weight: 600; } .na-preview i { position: absolute; right: 16px; top: 16px; width: 26px; height: 26px; border-radius: 50%; } .na-preview i + i { right: 48px; }
.na-logos { display: flex; gap: 10px; flex-wrap: wrap; }
.logo-tile { width: 108px; border: 1px solid var(--line); background: #fff; border-radius: 11px; padding: 0; overflow: hidden; display: grid; transition: box-shadow var(--fast); }
.logo-tile img { width: 100%; height: 70px; object-fit: contain; padding: 10px; } .logo-tile span { background: var(--raised2); color: var(--soft); font-size: 10px; padding: 4px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logo-tile.none { background: var(--raised2); } .logo-tile.none b { height: 70px; display: grid; place-items: center; font-size: 22px; }
.logo-tile.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.na-web { display: flex; gap: 12px; align-items: flex-start; padding: 14px; margin-bottom: 18px; border-radius: var(--r-lg); background: var(--well); border: 1px solid var(--line2); } .na-web > div { display: grid; gap: 4px; min-width: 0; } .na-web b { font-size: 12.5px; } .na-web span.soft { font-size: 11.5px; line-height: 1.5; } .na-web ul { margin: 4px 0 0; padding-left: 16px; color: var(--soft); font-size: 11.5px; line-height: 1.6; }
.na-empty { display: grid; justify-items: start; gap: 6px; padding: 16px; margin-bottom: 10px; border-radius: var(--r-lg); border: 1px dashed var(--line3); background: var(--well); } .na-empty span { color: var(--faint); font-size: 11.5px; line-height: 1.5; max-width: 520px; } .na-empty .btn { margin-top: 6px; }
.fld > span .guess { font-style: normal; font-weight: 400; color: var(--accent); margin-left: 6px; }
.na-pics { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.na-shooting { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; color: var(--soft); font-size: 11.5px; }
.pic { position: relative; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: var(--well); aspect-ratio: 4 / 3; opacity: .5; transition: opacity var(--fast), border-color var(--fast); }
.pic img { width: 100%; height: 100%; object-fit: cover; display: block; } .pic:hover { opacity: .8; } .pic.on { opacity: 1; border-color: var(--accent); }
.pic .pic-tag { position: absolute; left: 5px; bottom: 5px; font-size: 10px; line-height: 1; padding: 3px 6px; border-radius: 5px; background: rgba(0, 0, 0, .66); color: #fff; }
.pic .tick { position: absolute; top: 5px; right: 5px; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); color: #fff; display: none; place-items: center; } .pic.on .tick { display: grid; }
.na-clips { display: grid; gap: 4px; margin-top: 12px; } .clip-row.off { opacity: .5; } .clip-row { display: flex; gap: 8px; align-items: center; color: var(--soft); } .clip-row span:first-of-type { flex: 1; color: var(--text); }
.na-starters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.starter { display: grid; gap: 2px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--raised2); cursor: pointer; position: relative; transition: border-color var(--fast); }
.starter input { position: absolute; right: 10px; top: 10px; accent-color: var(--accent); } .starter span { color: var(--soft); font-size: 11px; } .starter:hover { border-color: var(--line3); } .starter.on { border-color: var(--accent); background: linear-gradient(180deg, var(--accent-soft), transparent), var(--raised2); }

/* ---------- the library ---------- */
.lib { height: 100%; display: flex; flex-direction: column; background: var(--app); }
.lib .titlebar { background: transparent; border-bottom-color: transparent; }
.lib-search { width: 260px; height: 28px; padding: 0 10px 0 28px; border-radius: 8px; border: 1px solid var(--line); background: var(--well) no-repeat 9px 50% / 13px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='8.5' cy='8.5' r='5.5' fill='none' stroke='%236f6f78' stroke-width='1.8'/%3E%3Cpath d='M13 13l4 4' stroke='%236f6f78' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E"); outline: none; transition: border-color var(--fast), box-shadow var(--fast); }
.lib-search:focus { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.lib-main { flex: 1; overflow: auto; padding: 24px 48px 48px; }
.lib-head { display: flex; align-items: flex-end; gap: 20px; margin-bottom: 24px; }
.lib-head h1 { font-size: 28px; letter-spacing: -.03em; margin-bottom: 6px; } .lib-head p { font-size: 13px; line-height: 1.55; margin: 0; max-width: 620px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.card { text-align: left; padding: 0; border: 1px solid var(--line); background: var(--panel); border-radius: var(--r-lg); overflow: hidden; transition: border-color var(--fast); }
.card:hover { border-color: var(--line3); }
.notice { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 12px; margin: 0 0 18px; border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line2); color: var(--soft); font-size: 12.5px; line-height: 1.5; } .notice > svg { color: var(--soft); flex: none; } .notice div { flex: 1; display: grid; gap: 3px; }
/* add an app: two ways in */
.add-ways { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.add-way { display: grid; align-content: start; gap: 8px; padding: 16px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--well); opacity: .72; transition: opacity var(--fast), border-color var(--fast), background var(--fast); }
.add-way.on { opacity: 1; border-color: var(--accent-line); background: var(--panel); } .add-way:not(.on):hover { opacity: .9; }
.add-way > b { font-size: 13.5px; } .add-way > span.soft { font-size: 12px; line-height: 1.5; min-height: 54px; } .add-way small { font-size: 11px; line-height: 1.45; }
.way-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--raised); color: var(--accent); }
.way-go { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 4px; } .way-go .input { flex: 1; min-width: 0; }
.reading .progress { width: 100%; margin: 4px 0 10px; } .reading p.soft { min-height: 18px; }
.card-wrap { position: relative; display: grid; } .card-wrap > .card { width: 100%; height: 100%; }
.card-more { position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; border-radius: 8px; border: 0; background: rgba(18, 18, 22, .72); backdrop-filter: blur(10px); color: #fff; display: grid; place-items: center; opacity: 0; transition: opacity var(--fast), transform var(--med) var(--ease); }
.card-wrap:hover .card-more, .card-more:focus-visible { opacity: 1; } .card-wrap:hover .card-more { transform: translateY(-3px); } .card-more:hover { background: rgba(18, 18, 22, .92); }
.welcome-mark { width: 44px; height: 44px; margin-bottom: 4px; }
.cover { aspect-ratio: 16 / 10; background: var(--well); display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 3px; overflow: hidden; position: relative; }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; } .cover > :first-child { grid-row: span 2; } .cover.one { grid-template-columns: 1fr; grid-template-rows: 1fr; } .cover.one > :first-child { grid-row: auto; }
.cover-empty { color: var(--faint); display: grid; place-items: center; grid-column: 1 / -1; grid-row: 1 / -1; }
.card-body { padding: 13px 15px 15px; display: grid; gap: 3px; }
.card-name { font-size: 14px; font-weight: 600; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; } .card-tag { color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta { color: var(--faint); font-size: 11px; margin-top: 6px; display: flex; align-items: center; gap: 8px; }
.card-src { color: var(--faint); font: 10.5px var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.swatches { display: inline-flex; margin-left: auto; } .swatches i { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--panel); margin-left: -4px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08); }
.empty-drop { width: 100%; max-width: 860px; border: 1.5px dashed var(--line3); background: none; border-radius: 16px; padding: 48px 40px; display: grid; justify-items: center; gap: 10px; color: var(--soft); transition: border-color var(--med), background var(--med); }
.empty-drop:hover { border-color: var(--accent-line); } .empty-drop b { color: var(--text); font-size: 17px; letter-spacing: -.02em; font-family: var(--display); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; width: 100%; text-align: left; }
.steps div { padding: 14px; border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line); display: grid; gap: 4px; align-content: start; } .steps em { font-style: normal; color: var(--accent); font: 600 11px var(--mono); } .steps span { color: var(--faint); font-size: 11.5px; line-height: 1.5; }
.lib-foot { display: flex; align-items: center; gap: 10px; padding: 10px 48px; border-top: 1px solid var(--line); color: var(--faint); font-size: 12px; background: var(--app); }
.lib-foot code { max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: bottom; }
.drop-hint { position: fixed; inset: 10px; border: 2px dashed var(--accent); border-radius: 16px; background: rgba(9, 9, 11, .9); display: grid; place-content: center; justify-items: center; gap: 10px; color: var(--accent); font-size: 15px; pointer-events: none; }

/* ---------- the editor: Figma UI3 ---------- */
.boot { height: 100%; display: grid; place-content: center; gap: 10px; text-align: center; color: var(--soft); } .boot .error { max-width: 520px; }
.editor-shell { height: 100%; display: grid; grid-template-rows: 48px minmax(0, 1fr); font-size: 12.5px; --panel: #121215; --raised: #18181b; --raised2: #202024; --well: #0c0c0f; --canvas: #09090b; }
.editor-shell .toolbar { height: 48px; padding: 0 12px 0 82px; gap: 4px; background: var(--app); border-bottom: 1px solid var(--line); }
.crumb { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--text); height: 30px; padding: 0 8px; border-radius: var(--r-sm); font-weight: 500; font-size: 13px; }
.crumb:hover { background: var(--hover); } .crumb .ico:last-child { color: var(--faint); }
.crumb-sep { color: var(--ghost); } .crumb-doc { font-weight: 500; font-size: 13px; color: var(--text); max-width: 340px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 4px; }
.save { font-size: 12px; color: var(--faint); margin-left: 4px; display: inline-flex; align-items: center; gap: 6px; } .save::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); opacity: .7; }
.save.unsaved::before, .save.saving::before { background: var(--warn); } .save.error { color: var(--danger); } .save.error::before { background: var(--danger); }
.tb-sep { width: 1px; height: 18px; background: var(--line2); margin: 0 6px; }
.zoom { display: inline-flex; align-items: center; gap: 3px; border: 0; background: none; color: var(--soft); font: 12px var(--mono); min-width: 58px; height: 28px; padding: 0 6px; border-radius: 6px; } .zoom:hover { background: var(--hover); color: var(--text); }
.fmts button { font-family: var(--mono); text-transform: none; } .toolbar .seg { flex-wrap: nowrap; flex: none; }
@media (max-width: 1180px) { .editor-shell .crumb-doc { max-width: 160px; } .editor-shell .toolbar .btn .kbd { display: none; } }
.workspace { position: relative; min-height: 0; overflow: hidden; }
.stage { position: absolute; inset: 0; background: var(--canvas); }
.float { position: absolute; background: var(--panel); border-radius: 12px; box-shadow: var(--shadow-panel); z-index: 10; }
.sidebar.float { left: 8px; top: 8px; bottom: 8px; width: 244px; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.inspector.float { right: 8px; top: 8px; bottom: 8px; width: 264px; overflow: auto; }
.timeline.float { left: 260px; right: 280px; bottom: 8px; display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: visible; }
.timeline.float > .tl-body { border-radius: 0 0 12px 12px; }
/* the side panels' pop-ups open beside them, over the timeline (the panels never overlap it) */
.sidebar.float, .inspector.float { z-index: 11; }
.ui-hidden .float, .ui-hidden .bottombar { display: none; }
.ui-back { position: absolute; left: 12px; top: 12px; z-index: 12; width: 32px; height: 32px; border-radius: 9px; border: 0; background: var(--panel); color: var(--soft); display: grid; place-items: center; box-shadow: var(--shadow-panel); }
.ui-back:hover { color: var(--text); }

/* the floating tool bar */
/* getting started (onboarding.js): the bottom left of the canvas, above the tool bar (and a video's timeline), where a
   design fitted to the window leaves room */
.onboarding { position: absolute; left: 260px; bottom: 74px; z-index: 8; background: var(--panel); border-radius: var(--r-lg); box-shadow: var(--shadow-panel); color: var(--text); }
.ui-hidden .onboarding { display: none; } .with-timeline .onboarding { bottom: auto; top: 8px; }   /* a video fills the stage; its timeline takes the bottom */
.onboarding.open { width: 268px; padding: 10px 8px 8px; animation: ob-in .22s ease-out; }
@keyframes ob-in { from { opacity: 0; transform: translateY(4px); } }
.onboarding header { display: flex; align-items: center; gap: 9px; padding: 0 0 8px 6px; }
.onboarding header div { flex: 1; display: grid; gap: 1px; min-width: 0; } .onboarding header b { font-size: 12px; font-weight: 600; } .onboarding header span { color: var(--faint); font-size: 11px; }
.onboarding ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.onboarding li { display: flex; gap: 9px; align-items: flex-start; padding: 6px; border-radius: 7px; }
.onboarding li i { flex: none; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--line3); display: grid; place-items: center; margin-top: 1px; transition: background var(--fast), border-color var(--fast); }
.onboarding li.done i { background: var(--accent); border-color: var(--accent); color: #fff; }
.onboarding li div { display: grid; gap: 3px; min-width: 0; } .onboarding li b { font-size: 12px; font-weight: 500; }
.onboarding li.done b { color: var(--faint); text-decoration: line-through; text-decoration-color: var(--line3); }
.onboarding li.next { background: var(--raised); } .onboarding li.next i { border-color: var(--accent); } .onboarding li span { color: var(--soft); font-size: 11px; line-height: 1.45; }
.onboarding.folded { display: flex; align-items: center; gap: 8px; height: 32px; max-width: 320px; padding: 0 12px 0 7px; border: 0; font: 500 12px var(--sans); cursor: pointer; } .onboarding.folded span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .onboarding.folded b { color: var(--faint); font-weight: 500; font-variant-numeric: tabular-nums; }
.onboarding.folded:hover { background: var(--raised); }
.ob-ring { width: 20px; height: 20px; flex: none; transform: rotate(-90deg); } .ob-ring circle { fill: none; stroke-width: 2.5; stroke: var(--line3); }
.ob-ring circle + circle { stroke: var(--accent); stroke-linecap: round; transition: stroke-dasharray .3s ease; }
.bottombar { position: absolute; left: 260px; right: 280px; bottom: 16px; display: flex; justify-content: center; pointer-events: none; z-index: 9; }
.bottombar.over-tl { bottom: calc(var(--tl-h, 300px) + 18px); }
.ui-hidden .bottombar { left: 0; right: 0; }
.tb { pointer-events: auto; display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 12px; background: var(--raised); box-shadow: var(--shadow-pop); animation: sheet .3s var(--ease); }
.tb-btn { width: 36px; height: 36px; border: 0; border-radius: 9px; background: none; color: var(--soft); display: grid; place-items: center; transition: background var(--fast), color var(--fast); }
.tb-btn:hover { background: var(--hover); color: var(--text); } .tb-btn.on { background: var(--accent-soft); color: var(--accent-text); }
.tb-div { width: 1px; height: 20px; background: var(--line2); margin: 0 4px; }
.tb-pop { position: relative; }

/* the left panel */
.tabs { display: flex; align-items: center; gap: 16px; padding: 10px 10px 0 14px; border-bottom: 1px solid var(--line); } .tabs > .icon-btn { margin-bottom: 4px; }
.tabs button { border: 0; background: none; color: var(--faint); padding: 6px 0 9px; font-weight: 500; font-size: 12.5px; border-bottom: 1.5px solid transparent; margin-bottom: -1px; transition: color var(--fast); }
.tabs button:hover { color: var(--soft); } .tabs button.on { color: var(--text); border-bottom-color: var(--text); }
.panel { overflow: auto; padding: 4px 6px 12px; } .panel.bare { padding-top: 8px; } .panel.designs, .panel.assets { flex: 1 1 45%; min-height: 110px; border-bottom: 1px solid var(--line); } .panel.brandp { flex: 1; min-height: 0; } .panel.layers { flex: 1 1 55%; min-height: 120px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 8px 4px; position: sticky; top: -4px; background: var(--panel); z-index: 2; }
.panel-head h3 { font-size: 12px; color: var(--soft); font-weight: 500; display: flex; align-items: center; gap: 6px; font-family: var(--sans); letter-spacing: 0; }
.panel-head .icon-btn { width: 24px; height: 24px; }
.panel-head.fold { cursor: pointer; } .panel-head.fold:hover h3 { color: var(--text); } .panel-head .count { color: var(--faint); font-weight: 500; }
.design { display: flex; align-items: center; gap: 10px; padding: 4px 6px; border-radius: var(--r-sm); cursor: pointer; position: relative; color: var(--soft); transition: background var(--fast); }
.design:hover { background: var(--hover); } .design.on { background: var(--press); color: var(--text); }
.design-thumb { width: 40px; height: 30px; border-radius: 5px; background: var(--well); overflow: hidden; display: grid; place-items: center; flex: none; box-shadow: inset 0 0 0 1px var(--line2); color: var(--faint); }
.design-thumb img { width: 100%; height: 100%; object-fit: cover; }
.design-name { flex: 1; min-width: 0; display: grid; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .design-name small { color: var(--faint); font-weight: 400; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; }
.row-menu .icon-btn { width: 22px; height: 22px; opacity: 0; } .design:hover .row-menu .icon-btn, .row-menu .icon-btn:focus-visible { opacity: 1; }
.add-row { display: flex; align-items: center; gap: 6px; width: 100%; border: 1px dashed var(--line2); background: none; color: var(--soft); border-radius: 7px; padding: 7px 9px; margin: 2px 0 6px; transition: border-color var(--fast), color var(--fast); }
.add-row:hover { color: var(--text); border-color: var(--accent-line); }
.layer { display: flex; align-items: center; gap: 8px; padding: 0 8px; height: 30px; border-radius: var(--r-sm); color: var(--soft); cursor: default; border: 1px solid transparent; }
.layer .ico { color: var(--faint); } .layer:hover { background: var(--hover); }
.layer.on { background: var(--press); color: var(--text); } .layer.on .ico { color: var(--text); } .layer.dim .layer-name { opacity: .45; } .layer.locked .layer-name { color: var(--soft); }
.layer.drop { box-shadow: inset 0 2px 0 var(--accent); }
.layer-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.layer .tag { color: var(--accent); font-size: 9px; }
.mini { border: 0; background: none; color: var(--faint); padding: 2px; border-radius: 4px; opacity: 0; display: grid; } .layer:hover .mini, .mini.set { opacity: 1; } .mini:hover { color: var(--text); }
.rename { flex: 1; min-width: 0; background: var(--well); border: 1px solid var(--accent); border-radius: 4px; padding: 1px 5px; outline: none; }
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; } .asset-grid.side { grid-template-columns: repeat(2, 1fr); padding: 2px 4px; gap: 8px; }
.asset { position: relative; padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--well); aspect-ratio: 1; display: block; transition: border-color var(--fast); }
.asset img { width: 100%; height: 100%; object-fit: cover; display: block; } .asset:hover { border-color: var(--line3); } .asset.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.asset span { position: absolute; left: 0; right: 0; bottom: 0; font-size: 9.5px; padding: 14px 6px 4px; background: linear-gradient(transparent, rgba(0, 0, 0, .78)); color: #e6e6e6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.asset.sm { width: 40px; height: 40px; } .asset.add { display: grid; place-items: center; color: var(--soft); background: var(--raised2); }
.badge { position: absolute; top: 4px; left: 4px; font: 600 9px var(--sans); font-style: normal; background: rgba(0, 0, 0, .65); color: #fff; padding: 1px 4px; border-radius: 3px; text-transform: uppercase; }

/* the brand panel */
.brand-sw { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 2px 4px 6px; }
.brand-sw label > div, .brand-sw > div { display: grid; gap: 5px; padding: 6px; border-radius: 9px; border: 1px solid var(--line); background: var(--raised); text-align: left; min-width: 0; }
.brand-sw label > div:hover { border-color: var(--line3); } .brand-sw i { display: block; height: 30px; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.brand-sw b { font-size: 10.5px; font-weight: 500; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .brand-sw small { font: 10px var(--mono); color: var(--faint); }
.brand-type { display: grid; gap: 4px; padding: 4px 8px 8px; } .brand-type div { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; } .brand-type span { color: var(--faint); font-size: 11px; } .brand-type b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-doc { margin: 4px 4px 10px; padding: 12px 14px; border-radius: 10px; background: var(--raised); border: 1px solid var(--line); color: var(--soft); font-size: 11.5px; line-height: 1.55; max-height: 300px; overflow: auto; }
.brand-doc h4 { color: var(--text); font-size: 11.5px; margin: 10px 0 3px; font-family: var(--sans); } .brand-doc h4:first-child { margin-top: 0; } .brand-doc p { margin: 0 0 6px; }
.md-edit { width: 100%; min-height: 52vh; font: 12px/1.6 var(--mono); }

/* ---------- the canvas: Figma's chrome ---------- */
.empty-stage { height: 100%; display: grid; place-content: center; text-align: center; gap: 8px; } .empty-stage h2 { font-size: 20px; letter-spacing: -.02em; }
.canvas { position: absolute; inset: 0; overflow: hidden; touch-action: none; user-select: none; background-color: var(--canvas); background-image: radial-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px); background-size: 24px 24px; }
.canvas.panning, .canvas.panning * { cursor: grabbing !important; }
.world { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.board { position: absolute; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3), 0 18px 50px rgba(0, 0, 0, .35); }
.board canvas { display: block; }
.overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.overlay rect, .overlay line, .overlay polygon { vector-effect: non-scaling-stroke; }
.overlay .sel { fill: none; stroke: var(--sel); stroke-width: 1.5; } .overlay .sel.faint { stroke-opacity: .45; stroke-dasharray: 4 3; } .overlay .sel.group { stroke-width: 1; }
.overlay .hover { fill: none; stroke: var(--sel); stroke-width: 1.5; stroke-opacity: .9; }
.overlay .handle { fill: #fff; stroke: var(--sel); stroke-width: 1.2; pointer-events: all; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .25)); }
.overlay .handle.side { fill: #fff; }
.overlay .rot-zone { fill: transparent; pointer-events: all; cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M17 7.2A7 7 0 1 0 19 12' fill='none' stroke='%23000' stroke-width='4' stroke-linecap='round'/%3E%3Cpath d='M17 7.2A7 7 0 1 0 19 12' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round'/%3E%3Cpath d='M19.5 3.5v4.6h-4.6' fill='none' stroke='%23000' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M19.5 3.5v4.6h-4.6' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") 12 12, alias; }
.overlay .guide { stroke: var(--red); stroke-width: 1; } .overlay .safe { fill: none; stroke: rgba(255, 180, 60, .45); stroke-dasharray: 6 5; }
.overlay .marquee { fill: var(--accent-soft); stroke: var(--sel); stroke-width: 1; } .overlay .draw { fill: var(--accent-soft); stroke: var(--sel); stroke-width: 1.5; }
.overlay .m-line { stroke: var(--red); stroke-width: 1; } .overlay .m-target { fill: none; stroke: var(--red); stroke-width: 1; stroke-dasharray: 3 2; }
.m-label { display: table; margin: 0 auto; background: var(--red); color: #fff; font: 600 10.5px/1 var(--sans); padding: 3px 5px 4px; border-radius: 4px; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.board-label { position: absolute; border: 0; background: none; color: var(--faint); font: 11px var(--sans); padding: 3px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: all; text-align: left; }
.board-label b { color: var(--soft); font-weight: 600; font-family: var(--sans); font-size: 11px; } .board-label i { font-style: normal; color: var(--sel); font-size: 10px; margin-left: 2px; }
.board-label:hover b, .board-label.on b { color: var(--sel); }
.size-tag { position: absolute; transform: translateX(-50%); background: var(--sel); color: #fff; font: 600 10.5px/1 var(--sans); padding: 4px 6px; border-radius: 4px; white-space: nowrap; pointer-events: none; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); font-variant-numeric: tabular-nums; }
.size-tag.rot { transform: none; }
/* text typed in place: a mirror of the words under a transparent textarea */
.text-edit { position: absolute; z-index: 5; transform-origin: 50% 50%; }
.te-box { position: absolute; left: 0; right: 0; outline: 1.5px solid var(--sel); outline-offset: 2px; border-radius: 1px; }
.te-mirror, .text-edit textarea { margin: 0; padding: 0; border: 0; white-space: pre-wrap; overflow-wrap: break-word; }
.text-edit textarea { position: absolute; inset: 0; width: 100%; height: 100%; resize: none; overflow: hidden; background: transparent; color: transparent; outline: none; }
.text-edit textarea::selection { background: rgba(124, 109, 250, .3); color: transparent; }
.te-star { opacity: .35; }
.te-hint { position: absolute; left: 0; top: calc(100% + 10px); white-space: nowrap; color: var(--soft); font-size: 10.5px; background: rgba(30, 30, 34, .94); padding: 3px 7px; border-radius: 5px; box-shadow: 0 4px 12px rgba(0, 0, 0, .3), 0 0 0 1px rgba(255, 255, 255, .06); }
.code-note { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; gap: 8px; align-items: center; background: var(--raised); border-radius: 99px; padding: 6px 14px; color: var(--soft); box-shadow: var(--shadow-pop); z-index: 12; }
.tpl-banner { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 12; display: flex; align-items: center; gap: 12px; width: min(640px, calc(100% - 580px)); min-width: 360px; padding: 9px 10px 9px 14px; border-radius: 13px; background: var(--raised); backdrop-filter: blur(16px); box-shadow: 0 0 0 1px var(--accent-line), 0 16px 44px rgba(0, 0, 0, .45); animation: sheet .3s var(--ease); }
.tpl-banner > div { flex: 1; min-width: 0; display: grid; gap: 2px; } .tpl-banner .ico { color: var(--accent); }
.tpl-banner b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .tpl-banner .soft { font-size: 11px; line-height: 1.4; } .tpl-banner code { font-size: 10px; padding: 0 3px; }

/* ---------- the Design panel ---------- */
.ins-tabs { display: flex; align-items: center; gap: 8px; padding: 12px 14px 2px; } .ins-tabs button { border: 0; background: none; padding: 4px 0 6px; font-weight: 500; font-size: 12.5px; color: var(--text); }
.ins { padding: 0 0 24px; }
.ins-title { display: flex; align-items: center; gap: 6px; padding: 4px 10px 12px 8px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--panel); z-index: 3; }
.ins-ico { color: var(--soft); display: grid; place-items: center; width: 20px; }
.ins-title .name { flex: 1; min-width: 0; font-weight: 600; font-size: 13.5px; letter-spacing: -.01em; background: none; border: 1px solid transparent; border-radius: var(--r-sm); padding: 5px 6px; outline: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ins-title .name:hover { border-color: var(--line2); } .ins-title .name:focus { border-color: var(--accent-line); background: var(--well); }
.ins-title .type { color: var(--faint); font-size: 12px; white-space: nowrap; font-family: var(--mono); }
.ins-sec { padding: 14px; border-bottom: 1px solid var(--line); }
.sec-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; gap: 8px; min-height: 20px; } .sec-head h4 { font-size: 12px; font-family: var(--sans); font-weight: 600; } .sec-head .soft { font-size: 12px; }
.fmt-chip { font: 10.5px var(--mono); color: var(--faint); } .fmt-chip.own { color: var(--warn); }
.pgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 8px; margin-bottom: 6px; align-items: center; }
.pgrid.ratio { grid-template-columns: 1fr 1fr 26px; }
.pcell { display: flex; align-items: center; gap: 4px; min-width: 0; } .pcell > * { min-width: 0; } .pcell .num { flex: 1; } .pcell.tight { gap: 2px; }
.pcell select.input { padding: 4px 22px 4px 7px; font-size: 12px; }
.alignrow { display: flex; align-items: center; gap: 1px; margin: -2px 0 10px; padding: 2px; border-radius: 7px; background: var(--well); } .alignrow .sep { width: 1px; height: 16px; background: var(--line2); margin: 0 3px; }
.alignrow .icon-btn { flex: 1; width: auto; }
.iconseg { display: flex; gap: 1px; padding: 2px; border-radius: 6px; background: var(--well); flex: 1; } .iconseg .icon-btn { flex: 1; width: auto; height: 22px; } .iconseg .icon-btn.on { background: var(--raised2); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
.f-row { display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: center; gap: 8px; margin-bottom: 7px; }
.f-row.wide { grid-template-columns: 1fr; gap: 6px; } .f-label { color: var(--soft); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.f-ctl { display: flex; align-items: center; gap: 6px; min-width: 0; } .f-ctl > * { min-width: 0; }
.f-ctl .seg { flex-wrap: nowrap; } .f-ctl .seg button { padding: 3px 7px; }
.grid4 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 8px; } .grid3 { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 6px; margin-bottom: 8px; }
.num { display: flex; align-items: center; background: var(--well); border: 1px solid transparent; border-radius: 5px; height: 26px; min-width: 0; flex: 1; transition: border-color var(--fast); }
.num:hover { border-color: var(--line2); } .num:focus-within { border-color: var(--accent); } .num.off { opacity: .5; }
.num .scrub { padding: 0 4px 0 8px; color: var(--faint); font-size: 11px; cursor: ew-resize; user-select: none; display: inline-flex; align-items: center; min-width: 22px; }
.num input { flex: 1; min-width: 0; width: 100%; border: 0; background: none; outline: none; padding: 0 6px 0 2px; font: 11.5px var(--sans); font-variant-numeric: tabular-nums; }
.num input::placeholder { color: var(--faint); }
.num i { font-style: normal; color: var(--faint); font-size: 10.5px; padding-right: 7px; }
.range { display: flex; align-items: center; gap: 8px; flex: 1; } .range input[type=range] { flex: 1; accent-color: var(--accent); min-width: 0; } .range .num { flex: 0 0 58px; }
.color { display: flex; align-items: center; gap: 0; flex: 1; min-width: 0; position: relative; background: var(--well); border-radius: 5px; border: 1px solid transparent; height: 26px; padding-left: 4px; transition: border-color var(--fast); }
.color:hover, .color.open { border-color: var(--line2); } .color .sw { width: 18px; height: 18px; cursor: pointer; border-radius: 4px; }
.color .hex { flex: 1; min-width: 0; width: 100%; background: none; border: 0; padding: 0 7px; color: var(--text); font: 11.5px var(--sans); box-shadow: none; }
.color .hex:focus { box-shadow: none; }
.fill { display: grid; gap: 8px; width: 100%; } .stops { display: grid; gap: 6px; }
.tokens { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.tok { display: flex; gap: 7px; align-items: center; border: 0; background: none; padding: 4px; border-radius: 5px; text-align: left; font-size: 11px; color: var(--soft); } .tok:hover { background: var(--hover); color: var(--text); } .tok.on { background: var(--accent-soft); color: var(--text); }
.imgpick { position: relative; flex: 1; } .imgbtn { width: 100%; display: flex; align-items: center; gap: 8px; background: var(--well); border: 1px solid transparent; border-radius: 5px; padding: 3px; text-align: left; position: relative; }
.imgbtn:hover { border-color: var(--line2); }
.imgbtn img, .imgbtn .empty { width: 34px; height: 24px; object-fit: cover; border-radius: 3px; display: grid; place-items: center; background: var(--canvas); color: var(--faint); flex: none; }
.imgbtn span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .imgbtn .badge { position: static; }
.images { position: relative; width: 100%; } .thumbs { display: flex; flex-wrap: wrap; gap: 5px; }
.fmt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-bottom: 10px; }
.fmt-grid.where .fmt { padding: 7px 8px; gap: 9px; text-align: left; } .fmt-grid.where .fmt span { display: grid; gap: 1px; min-width: 0; } .fmt-grid.where .fmt b { font-weight: 600; } .fmt-grid.where .fmt small { font: 10px var(--sans); color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .fmt-grid.where .fmt i { flex: none; width: auto; height: 20px; }
.fld > span .link { font-weight: 400; margin-left: 6px; font-size: 11px; }
.need { display: grid; gap: 6px; justify-items: start; padding: 14px; margin-bottom: 14px; border-radius: var(--r-lg); border: 1px solid var(--line3); background: var(--well); } .need span { color: var(--soft); font-size: 12px; line-height: 1.5; }
.fmt { display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: none; border-radius: var(--r-sm); padding: 6px 8px; color: var(--faint); font: 12px var(--mono); transition: border-color var(--fast), color var(--fast), background var(--fast); }
.fmt:hover { border-color: var(--line2); color: var(--soft); }
.fmt i { height: 16px; border: 1.5px solid currentColor; border-radius: 2px; display: block; } .fmt.on { color: var(--text); border-color: var(--accent-line); background: var(--accent-soft); } .fmt.base { box-shadow: inset 0 -2px 0 var(--accent); } .fmt:disabled { opacity: .35; }
.keybtn { border: 0; background: none; color: var(--faint); padding: 3px; border-radius: 4px; display: grid; flex: none; } .keybtn.has { color: var(--soft); } .keybtn.on { color: var(--accent); } .keybtn:hover { background: var(--hover); }
.keys-list { display: grid; gap: 4px; margin-top: 8px; } .key-row { display: flex; align-items: center; gap: 7px; color: var(--accent); } .key-row span:first-of-type { color: var(--text); flex: 1; }
.export-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; } .export-row .soft { font-size: 11px; }
/* constraints: Figma's diagram */
.cons { display: grid; grid-template-columns: 76px 1fr; gap: 10px; align-items: center; margin-bottom: 8px; }
.cons-box { position: relative; width: 76px; height: 76px; border-radius: 6px; background: var(--well); box-shadow: inset 0 0 0 1px var(--line); }
.cons-box > i, .cons-box b > i { position: absolute; cursor: pointer; }
.cons-box > i::after, .cons-box b > i::after { content: ""; position: absolute; background: var(--faint); border-radius: 1px; transition: background var(--fast); }
.cons-box > i:hover::after, .cons-box b > i:hover::after { background: var(--soft); } .cons-box i.on::after { background: var(--accent) !important; }
.cn-l, .cn-r { top: 26px; width: 16px; height: 24px; } .cn-l { left: 4px; } .cn-r { right: 4px; }
.cn-l::after, .cn-r::after { left: 3px; right: 3px; top: 11px; height: 2px; }
.cn-t, .cn-b { left: 26px; width: 24px; height: 16px; } .cn-t { top: 4px; } .cn-b { bottom: 4px; }
.cn-t::after, .cn-b::after { top: 3px; bottom: 3px; left: 11px; width: 2px; }
.cons-box b { position: absolute; left: 24px; top: 24px; width: 28px; height: 28px; border-radius: 3px; box-shadow: inset 0 0 0 1.5px var(--line3); }
.cn-ch { left: 4px; right: 4px; top: 10px; height: 8px; } .cn-ch::after { left: 0; right: 0; top: 3px; height: 2px; }
.cn-cv { top: 4px; bottom: 4px; left: 10px; width: 8px; } .cn-cv::after { top: 0; bottom: 0; left: 3px; width: 2px; }
.cons-sel { display: grid; gap: 6px; } .cons-sel select.input { padding: 4px 22px 4px 7px; font-size: 12px; }

/* ---------- the timeline (timeline.js): after Veed and Screen Studio ---------- */
.tl-grip { position: absolute; left: 0; right: 0; top: -3px; height: 8px; cursor: ns-resize; z-index: 5; }
.tl-grip::after { content: ""; position: absolute; left: 50%; top: 5px; width: 36px; height: 3px; margin-left: -18px; border-radius: 3px; background: var(--line3); opacity: 0; transition: opacity var(--fast); }
.timeline:hover .tl-grip::after { opacity: 1; }
.tl-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 6px 10px; border-bottom: 1px solid var(--line); }
.tl-side { display: flex; align-items: center; gap: 2px; min-width: 0; } .tl-side.right { justify-content: flex-end; gap: 4px; }
.tl-side .btn.ghost { color: var(--soft); } .tl-side .btn.ghost:hover { color: var(--text); }
.tl-transport { display: flex; align-items: center; gap: 6px; }
.tl-play { width: 34px; height: 34px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--text); color: var(--raised); box-shadow: 0 4px 14px rgba(0, 0, 0, .35); transition: transform var(--fast); }
.tl-play:hover { transform: scale(1.05); } .tl-play .ico { margin-left: 1px; }
.tl-time { font: 12px var(--mono); font-variant-numeric: tabular-nums; color: var(--soft); margin-left: 8px; white-space: nowrap; } .tl-time b { color: var(--text); font-weight: 500; }
.tl-zoom { width: 110px; accent-color: var(--text); }
.tl-body { position: relative; flex: 1; overflow: auto; overscroll-behavior: contain; }
.tl-inner { position: relative; }
/* the beat grid: bars, and beats when there is room for them */
.tl-lanes-bg { position: absolute; left: 0; right: 0; top: 26px; bottom: 0; pointer-events: none;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .06) 0 1px, transparent 1px var(--bar)); background-position: var(--pad) 0; }
.tl-lanes-bg.beats { background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .07) 0 1px, transparent 1px var(--bar)), repeating-linear-gradient(90deg, rgba(255, 255, 255, .03) 0 1px, transparent 1px var(--beat)); background-position: var(--pad) 0, var(--pad) 0; }
.tl-ruler { position: sticky; top: 0; z-index: 4; height: 26px; background: var(--panel); border-bottom: 1px solid var(--line); cursor: text; }
.tl-ruler canvas { position: sticky; left: 0; display: block; }
.tl-lane { position: relative; margin: 6px 0; }
/* scenes: a filmstrip of their frames, the title, the length; trim at either edge */
.tl-scene { position: absolute; top: 0; height: 100%; border-radius: var(--r); overflow: hidden; background: #1a1a1e; box-shadow: inset 0 0 0 1px var(--line2); cursor: grab; }
.tl-scene:active { cursor: grabbing; }
.tl-strip { position: absolute; inset: 3px 0; pointer-events: none; }
.tl-strip img, .tl-strip i { position: absolute; top: 0; height: 100%; object-fit: cover; display: block; }
.tl-strip i { background: linear-gradient(100deg, rgba(255, 255, 255, .03) 30%, rgba(255, 255, 255, .08) 50%, rgba(255, 255, 255, .03) 70%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
.tl-scene::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, .6)); pointer-events: none; }
.tl-scene-t { position: absolute; left: 15px; right: 9px; bottom: 5px; z-index: 1; display: flex; align-items: baseline; gap: 6px; pointer-events: none; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); min-width: 0; }
.tl-scene-t b { font-weight: 600; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .tl-scene-t em { font: 10.5px var(--mono); font-style: normal; opacity: .75; flex: none; }
.tl-scene.open { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28); }
.tl-scene.on { box-shadow: inset 0 0 0 2px var(--sel), 0 0 0 1px var(--sel); }
.tl-scene.moving { opacity: .55; }
.tl-trim { position: absolute; top: 0; bottom: 0; width: 9px; z-index: 2; cursor: ew-resize; opacity: 0; transition: opacity var(--fast); background: rgba(255, 255, 255, .92); }
.tl-trim::after { content: ""; position: absolute; top: 50%; left: 3.5px; width: 2px; height: 16px; margin-top: -8px; border-radius: 2px; background: rgba(0, 0, 0, .45); }
.tl-trim.l { left: 0; border-radius: 9px 0 0 9px; } .tl-trim.r { right: 0; border-radius: 0 9px 9px 0; }
.tl-scene:hover .tl-trim, .tl-scene.on .tl-trim { opacity: 1; } .tl-scene.on .tl-trim { background: var(--sel); } .tl-scene.on .tl-trim::after { background: rgba(255, 255, 255, .8); }
.tl-exit { position: absolute; top: 50%; z-index: 3; width: 20px; height: 20px; margin: -10px 0 0 -11px; padding: 0; border-radius: 6px; border: 1px solid var(--line3); background: #1f1f23; color: var(--faint); display: grid; place-items: center; transition: color var(--fast), border-color var(--fast); }
.tl-exit:hover { color: var(--text); border-color: var(--text); } .tl-exit.on { color: var(--sel); border-color: var(--accent-line); }
.tl-drop { position: absolute; top: -3px; bottom: -3px; width: 3px; margin-left: -2px; border-radius: 2px; background: var(--sel); box-shadow: 0 0 10px var(--accent-line); z-index: 4; }
/* the music: its waveform, like an audio track */
.tl-music-box { position: absolute; top: 0; bottom: 0; border-radius: 9px; background: rgba(59, 130, 246, .16); box-shadow: inset 0 0 0 1px rgba(96, 165, 250, .22); cursor: pointer; }
.tl-music-box.on { box-shadow: inset 0 0 0 2px var(--sel); }
.tl-music canvas { position: sticky; left: 0; display: block; top: 0; padding-top: 5px; box-sizing: content-box; pointer-events: none; }
.tl-music .tl-tag { position: absolute; top: 8px; display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: #dbeafe; background: rgba(15, 23, 42, .72); padding: 2px 8px 2px 6px; border-radius: 6px; pointer-events: none; white-space: nowrap; }
/* sound effects: pills at their times */
.tl-sound { position: absolute; top: 2px; height: 20px; padding: 0 7px 0 13px; border: 0; border-radius: 10px; font-size: 10.5px; color: #fde68a; background: rgba(245, 185, 77, .16); box-shadow: inset 0 0 0 1px rgba(245, 185, 77, .3); white-space: nowrap; cursor: pointer; }
.tl-sound::before { content: ""; position: absolute; left: 5px; top: 7px; width: 5px; height: 5px; border-radius: 50%; background: #f5b94d; }
.tl-sound.transition, .tl-sound.entrance { color: rgba(253, 230, 138, .7); background: rgba(245, 185, 77, .08); box-shadow: inset 0 0 0 1px rgba(245, 185, 77, .18); }
.tl-sound.cue { cursor: grab; } .tl-sound.on { box-shadow: inset 0 0 0 2px var(--sel); color: #fff; }
/* the open scene's layers */
.tl-layers-h { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; font-size: 10.5px; color: var(--faint); font-weight: 600; letter-spacing: .02em; }
.tl-layers { position: relative; display: grid; gap: 0; padding-bottom: 8px; }
.tl-row { position: relative; } .tl-row.dim { opacity: .45; }
.tl-span { position: absolute; top: 3px; height: 18px; border-radius: 5px; background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); overflow: hidden; display: flex; align-items: center; cursor: grab; }
.tl-span.t-text { background: var(--accent-soft); box-shadow: inset 0 0 0 1px rgba(167, 139, 250, .3); }
.tl-span.t-image, .tl-span.t-browser, .tl-span.t-phone, .tl-span.t-compare, .tl-span.t-slices, .tl-span.t-grid, .tl-span.t-planes, .tl-span.t-zoomBlur { background: rgba(45, 212, 191, .13); box-shadow: inset 0 0 0 1px rgba(45, 212, 191, .28); }
.tl-row.on .tl-span { box-shadow: inset 0 0 0 1.5px var(--sel); }
.tl-span em { position: relative; font-style: normal; font-size: 10.5px; color: var(--text); padding: 0 7px; white-space: nowrap; pointer-events: none; }
.tl-in, .tl-out { position: absolute; top: 0; bottom: 0; pointer-events: none; } .tl-in { left: 0; background: linear-gradient(90deg, rgba(255, 255, 255, .02), rgba(255, 255, 255, .16)); } .tl-out { right: 0; background: linear-gradient(90deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .02)); }
.tl-stretch { position: absolute; right: 0; top: 0; bottom: 0; width: 7px; cursor: ew-resize; } .tl-stretch:hover { background: rgba(255, 255, 255, .25); }
.tl-key { position: absolute; top: 7px; width: 9px; height: 9px; margin-left: -4.5px; background: var(--warn); transform: rotate(45deg); border-radius: 1.5px; cursor: pointer; z-index: 2; box-shadow: 0 0 0 1.5px rgba(0, 0, 0, .35); }
/* the playhead: moved by transform, never by a re-render */
.tl-head { position: absolute; left: 0; top: 0; bottom: 0; width: 0; z-index: 6; will-change: transform; cursor: ew-resize; }
.tl-head::before { content: ""; position: absolute; top: 0; bottom: 0; left: -1px; width: 2px; background: #ff4f5e; box-shadow: 0 0 6px rgba(255, 79, 94, .5); pointer-events: none; }
.tl-head i { position: sticky; top: 0; display: block; width: 13px; height: 16px; margin-left: -6.5px; background: #ff4f5e; border-radius: 3px 3px 7px 7px; box-shadow: 0 2px 6px rgba(0, 0, 0, .4); }
.tl-tip { position: absolute; top: 30px; z-index: 7; transform: translateX(-50%); background: var(--sel); color: #fff; font: 600 10.5px var(--sans); padding: 3px 7px; border-radius: 5px; white-space: nowrap; pointer-events: none; }
/* the timeline's side panels (tlpanels.js) */
.tl-hint { margin: 2px 0 8px; font-size: 11px; }
.tl-acts { display: flex; flex-wrap: wrap; gap: 6px; } .btn.danger { color: #ff9b9b; }
.tl-layer-row { display: flex; align-items: center; justify-content: space-between; width: 100%; border: 0; background: none; padding: 5px 6px; border-radius: 6px; color: var(--text); text-align: left; }
.tl-layer-row:hover { background: var(--hover); } .tl-layer-row em { font-style: normal; font-size: 10.5px; color: var(--faint); }

/* ---------- previews ---------- */
.preview { width: 100%; border-radius: var(--r-lg); margin-top: 10px; border: 1px solid var(--line); background: #000; max-height: 46vh; object-fit: contain; }
.film { width: 100%; height: calc(88vh - 150px); border: 0; border-radius: var(--r-lg); background: #0c0c0f; }

/* ---------- keyboard shortcuts ---------- */
.keys-grid { columns: 3 250px; column-gap: 28px; } .keys-grid section { break-inside: avoid; margin-bottom: 18px; }
.keys-grid h4 { font-size: 12px; margin-bottom: 8px; font-family: var(--sans); } .kr { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--line); color: var(--soft); }
.kk { display: inline-flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }

/* ---------- templates: the gallery, filling one in ---------- */
.sheet.gallery .sheet-head { align-items: center; }
.gal { flex: 1; min-height: 0; display: grid; grid-template-columns: 200px minmax(0, 1fr); }
.gal-rail { border-right: 1px solid var(--line); padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; overflow: auto; background: rgba(0, 0, 0, .1); }
.gal-rail .seg.kind { align-self: stretch; margin-bottom: 12px; display: grid; grid-template-columns: 1fr 1fr; } .gal-rail .seg.kind button { font-size: 12px; padding: 4px 12px; }
.rail { display: flex; justify-content: space-between; align-items: center; border: 0; background: none; color: var(--soft); padding: 6px 9px; border-radius: 7px; text-align: left; font-weight: 500; transition: background var(--fast), color var(--fast); }
.rail span { color: var(--faint); font-weight: 400; font-size: 11px; font-variant-numeric: tabular-nums; } .rail:hover { background: var(--hover); color: var(--text); } .rail.on { background: var(--accent-soft); color: var(--text); }
.rail-head { color: var(--faint); font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; padding: 16px 9px 5px; }
.gal-main { overflow: auto; padding: 0 20px 24px; min-width: 0; }
.gal-bar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 3; background: var(--raised); padding: 14px 0 12px; }
.gal-bar .input { max-width: 340px; flex: 1; }
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; align-items: start; } .tgrid.video { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.tcard { position: relative; border: 1px solid var(--line); background: var(--panel); border-radius: 13px; overflow: hidden; cursor: pointer; transition: border-color var(--med), transform var(--med) var(--ease), box-shadow var(--med); }
.tcard:hover { border-color: var(--line2); transform: translateY(-3px); box-shadow: 0 18px 44px rgba(0, 0, 0, .45); }
.shot { width: 100%; background: var(--well); position: relative; overflow: hidden; } .shot img { width: 100%; height: 100%; object-fit: cover; display: block; } .shot.fit img { object-fit: contain; }
.shimmer { position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .06) 50%, transparent 70%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.tcard-body { padding: 11px 13px 13px; display: grid; gap: 3px; } .tcard-body b { font-size: 13px; letter-spacing: -.01em; }
.tcard-body .soft { font-size: 11px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tcard .chip.yours { position: absolute; top: 9px; left: 9px; box-shadow: 0 4px 12px rgba(0, 0, 0, .3); }
.tcard-acts { position: absolute; top: 9px; right: 9px; display: flex; gap: 4px; opacity: 0; transform: translateY(-2px); transition: opacity var(--fast), transform var(--fast); }
.tcard:hover .tcard-acts, .tcard:focus-within .tcard-acts { opacity: 1; transform: none; }
.tcard-acts .btn, .tcard-acts .icon-btn { background: rgba(20, 20, 24, .86); border: 1px solid rgba(255, 255, 255, .14); color: var(--text); backdrop-filter: blur(8px); } .tcard-acts .icon-btn { width: 24px; height: 24px; }
.gal-empty { border: 1.5px dashed var(--line3); border-radius: 14px; padding: 20px 24px; margin-bottom: 16px; display: grid; gap: 6px; color: var(--soft); }
.gal-empty b { color: var(--text); font-size: 14px; } .gal-empty ol { margin: 6px 0 0; padding-left: 18px; line-height: 1.9; } .gal-empty i { font-style: normal; color: var(--text); }
.use { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 380px; grid-template-rows: minmax(0, 1fr) auto; grid-template-areas: "stage form" "foot foot"; }
.use-stage { grid-area: stage; display: flex; flex-direction: column; padding: 12px 18px 6px; min-height: 0; background: var(--canvas); }
.use-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.use-pic { flex: 1; min-height: 0; position: relative; }
.use-pic img { position: absolute; inset: 0; margin: auto; max-width: 100%; max-height: 100%; display: block; border-radius: 3px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .07), 0 24px 70px rgba(0, 0, 0, .55); }
.use-pic .spinner { position: absolute; inset: 0; margin: auto; }
.use-form { grid-area: form; overflow: auto; padding: 16px 20px 22px; border-left: 1px solid var(--line); }
.use-head { display: flex; align-items: center; gap: 8px; } .use-head h3 { font-size: 16px; letter-spacing: -.02em; } .use-form > .soft { margin: 4px 0 16px; line-height: 1.5; }
.use-ai { display: flex; gap: 8px; margin: 2px 0 18px; padding: 8px; border-radius: 11px; background: linear-gradient(var(--raised2), var(--raised2)) padding-box, var(--ai) border-box; border: 1px solid transparent; }
.use-ai .input { background: var(--well); font-size: 11.5px; border-color: transparent; }
.use-fld > span { display: flex; gap: 8px; align-items: baseline; } .use-fld .req { color: var(--faint); font-weight: 500; font-size: 10px; }
.use-fld .ex { font-style: normal; color: var(--warn); font-size: 10px; } .use-fld em { margin-left: auto; font-style: normal; color: var(--faint); font: 10px var(--mono); } .use-fld em.over { color: var(--danger); }
.use-sec { display: flex; align-items: center; gap: 6px; width: 100%; color: var(--faint); font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; margin: 20px 0 10px; border: 0; background: none; padding: 0; text-align: left; }
.use-sec .soft { font-weight: 400; } .use-sec.fold:hover { color: var(--text); }
.use-foot { grid-area: foot; display: flex; align-items: center; gap: 10px; padding: 13px 22px; border-top: 1px solid var(--line); background: rgba(0, 0, 0, .12); }

/* ---------- the AI layer ---------- */
.set-sec { display: grid; gap: 4px; padding-bottom: 24px; } .set-sec + .set-sec { border-top: 1px solid var(--line); padding-top: 20px; } .set-sec > h3 { font-size: 14px; margin: 0 0 4px; } .set-sec > p.soft { margin: 0 0 14px; font-size: 13px; line-height: 1.5; }
.dot-state { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); margin: 0 2px 1px 6px; vertical-align: middle; } .dot-state.on { background: var(--ok); box-shadow: 0 0 8px rgba(61, 214, 140, .5); } .fld > span em { font-style: normal; font-weight: 400; }
.ai-what { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.ai-what div { display: grid; gap: 4px; align-content: start; padding: 12px; border-radius: 11px; background: var(--raised2); border: 1px solid var(--line); } .ai-what span { color: var(--faint); font-size: 11px; line-height: 1.5; }
.runtimes { display: grid; gap: 6px; margin: 2px 0 16px; }
.runtime { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; background: var(--raised2); border: 1px solid var(--line); }
.runtime .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); } .runtime.on .dot { background: var(--ok); box-shadow: 0 0 10px rgba(61, 214, 140, .6); } .runtime.soon { opacity: .55; }
.runtime b { font-weight: 600; } .runtime span { color: var(--faint); font-size: 11px; display: block; line-height: 1.45; } .runtime em { font-style: normal; font-size: 11px; color: var(--soft); white-space: nowrap; }
.ai-ideas { display: flex; flex-wrap: wrap; gap: 6px; margin: -2px 0 16px; } .ai-ideas .chip { cursor: pointer; transition: color var(--fast), border-color var(--fast); } .ai-ideas .chip:hover { color: var(--text); border-color: var(--line3); }
.ai-steps { display: grid; gap: 12px; padding: 36px 10px 10px; max-width: 640px; margin: 0 auto; }
.ai-step { display: grid; grid-template-columns: 22px auto minmax(0, 1fr); align-items: center; gap: 10px; animation: fade .3s ease-out; }
.ai-step .dot { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--line3); }
.ai-step.run .dot i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--accent); border-top-color: transparent; animation: spin .8s linear infinite; }
.ai-step.done .dot { background: var(--ok); border-color: var(--ok); color: #0b2a1b; }
.ai-step .soft { font: 11px var(--mono); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ai-result-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .ai-result-head h3 { font-size: 17px; letter-spacing: -.02em; }
.ai-shots { display: flex; gap: 16px; align-items: flex-end; margin: 14px 0; overflow-x: auto; padding-bottom: 4px; }
.ai-shots figure { margin: 0; display: grid; gap: 6px; flex: none; } .ai-shots img { height: 300px; border-radius: 4px; display: block; box-shadow: 0 0 0 1px rgba(255, 255, 255, .07), 0 16px 44px rgba(0, 0, 0, .5); }
.ai-shots.video img { height: 250px; } .ai-shots figcaption { color: var(--faint); font: 11px var(--mono); text-align: center; }
.critique { display: grid; gap: 8px; margin: 12px 0 4px; padding: 12px 14px; border-radius: 12px; background: var(--raised2); border: 1px solid var(--line); }
.critique-head { display: flex; align-items: center; gap: 10px; } .critique-head b { font-size: 12.5px; }
.verdict { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: rgba(61, 214, 140, .14); color: var(--ok); } .verdict.below { background: rgba(245, 185, 77, .14); color: var(--warn); }
.rounds { display: flex; gap: 6px; margin-left: auto; } .rounds span { font: 11px var(--mono); color: var(--faint); padding: 2px 7px; border-radius: 6px; border: 1px solid var(--line); } .rounds span.last { color: var(--text); border-color: var(--line3); }
.voices { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.voice { display: grid; gap: 5px; } .voice span { color: var(--soft); font-size: 11px; text-transform: capitalize; display: flex; justify-content: space-between; } .voice span b { font: 600 11px var(--mono); color: var(--text); }
.voice i { height: 5px; border-radius: 3px; background: var(--line2); overflow: hidden; display: block; position: relative; } .voice i::after { content: ""; position: absolute; inset: 0; width: var(--v); background: var(--ai); border-radius: 3px; }
.issues { margin: 2px 0 0; padding-left: 16px; color: var(--soft); font-size: 11.5px; line-height: 1.6; } .issues em { font-style: normal; color: var(--faint); text-transform: capitalize; }

/* ---------- the command palette ---------- */
.cmdk-back { position: fixed; inset: 0; z-index: 70; background: rgba(0, 0, 0, .5); display: grid; justify-items: center; align-items: start; padding-top: 14vh; animation: fade var(--fast) ease-out; }
.cmdk { width: min(600px, 90vw); background: var(--raised); border-radius: var(--r-xl); box-shadow: var(--shadow-sheet); overflow: hidden; animation: sheet .22s var(--ease); }
.cmdk input { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: none; outline: none; padding: 16px 18px; font-size: 15px; }
.cmdk input::placeholder { color: var(--faint); }
.cmdk-list { max-height: 52vh; overflow: auto; padding: 6px; }
.cmdk-group { color: var(--faint); font-size: 12px; font-weight: 500; padding: 10px 10px 4px; }
.cmdk-item { display: flex; align-items: center; gap: 10px; width: 100%; height: 36px; padding: 0 10px; border: 0; border-radius: var(--r); background: none; text-align: left; color: var(--text); }
.cmdk-item .ico { color: var(--soft); } .cmdk-item small { color: var(--faint); margin-left: auto; font-size: 12px; white-space: nowrap; }
.cmdk-item.on { background: var(--press); } .cmdk-item.on .ico { color: var(--text); }
.cmdk-empty { padding: 22px; text-align: center; color: var(--faint); }
.cmdk-foot { display: flex; gap: 14px; padding: 8px 14px; border-top: 1px solid var(--line); color: var(--faint); font-size: 12px; }

/* ---------- a set on the canvas (setview.js) ---------- */
.spin { display: inline-block; width: 11px; height: 11px; border-radius: 50%; border: 1.8px solid var(--accent-text); border-top-color: transparent; animation: spin .8s linear infinite; flex: none; }
.set-canvas .board { border-radius: 2px; overflow: hidden; cursor: default; transition: box-shadow var(--fast); }
.set-canvas .board img { display: block; width: 100%; height: 100%; pointer-events: none; }
.set-canvas .board.on { box-shadow: 0 0 0 4px var(--sel), 0 18px 50px rgba(0, 0, 0, .35); }
.set-canvas .board.empty { background: var(--raised2); }
.set-wait { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; }
.set-wait span { position: relative; color: var(--faint); font: 500 28px/1.3 var(--sans); padding: 0 30px; text-align: center; }
.set-head { position: absolute; z-index: 4; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 2px; cursor: pointer; }
.set-n { font: 600 11px var(--mono); color: var(--faint); background: var(--panel); border: 1px solid var(--line2); border-radius: 6px; padding: 3px 6px; flex: none; }
.set-t { display: grid; min-width: 0; flex: 1; line-height: 1.3; }
.set-t b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.01em; }
.set-t span { color: var(--soft); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.set-head.on .set-t b { color: var(--sel); }
.set-state { display: inline-flex; align-items: center; gap: 7px; color: var(--soft); font-size: 11px; white-space: nowrap; max-width: 46%; overflow: hidden; text-overflow: ellipsis; background: var(--panel); padding: 4px 9px; border-radius: 99px; border: 1px solid var(--line2); }
.set-state.err { color: #ffb4b4; border-color: rgba(255, 107, 107, .35); }
.set-score { font: 600 11.5px var(--mono); padding: 3px 8px; border-radius: 99px; flex: none; }
.set-score.ok { color: var(--ok); background: rgba(61, 214, 140, .12); } .set-score.low { color: var(--warn); background: rgba(245, 185, 77, .12); }
.set-acts { display: flex; gap: 4px; align-items: center; flex: none; opacity: 0; transition: opacity var(--fast); }
.set-head:hover .set-acts, .set-head.on .set-acts { opacity: 1; }
.set-fmt { position: absolute; z-index: 3; color: var(--faint); font: 10.5px var(--mono); pointer-events: none; }
.set-title { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 6; display: flex; align-items: center; gap: 10px; padding: 7px 8px 7px 14px; border-radius: 12px; background: var(--raised); backdrop-filter: blur(16px); box-shadow: var(--shadow-panel); max-width: calc(100% - 600px); white-space: nowrap; }
.set-title b { font-size: 12.5px; } .set-title .soft { font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; }
.set-card { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); width: min(460px, calc(100% - 620px)); min-width: 320px; text-align: center; display: grid; gap: 10px; justify-items: center; padding: 28px 30px 24px; border-radius: var(--r-xl); background: var(--raised); backdrop-filter: blur(20px); box-shadow: var(--shadow-sheet); animation: sheet .3s var(--ease); }
.set-card h2 { font-size: 17px; letter-spacing: -.02em; } .set-card p { margin: 0; line-height: 1.55; }
.set-now { color: var(--accent-text); font-size: 11px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spin-dot { width: 34px; height: 34px; border-radius: 50%; background: var(--ai); position: relative; animation: breathe 1.8s ease-in-out infinite; box-shadow: 0 0 30px rgba(124, 109, 250, .35); }
@keyframes breathe { 50% { transform: scale(.86); opacity: .75; } }
/* the set's panel */
.set-p { margin: 0; line-height: 1.5; font-size: 12px; }
.set-why { margin: 8px 0 0; line-height: 1.5; font-size: 11.5px; color: var(--soft); } .set-why b { color: var(--text); font-weight: 600; margin-right: 4px; }
.set-dl { display: grid; grid-template-columns: auto 1fr; gap: 5px 10px; margin: 10px 0 0; font-size: 11.5px; } .set-dl dt { color: var(--faint); } .set-dl dd { margin: 0; color: var(--soft); line-height: 1.45; }
.set-promise { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: linear-gradient(var(--raised2), var(--raised2)) padding-box, var(--ai) border-box; border: 1px solid transparent; font-size: 12.5px; line-height: 1.45; font-weight: 500; }
/* the design system in the set panel: the palette its ads use, and others to choose */
.sys-pal { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; margin: 10px 0 0; font-size: 11px; line-height: 1.45; }
.sys-sw { display: inline-flex; border-radius: 6px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); } .sys-sw i { width: 16px; height: 22px; }
.sys-opts { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.sys-opt { display: inline-flex; align-items: center; gap: 7px; padding: 4px 8px 4px 4px; border: 1px solid var(--line); border-radius: 8px; background: none; color: var(--soft); font: inherit; font-size: 11px; cursor: pointer; }
.sys-opt:hover { border-color: var(--line-strong, var(--faint)); color: var(--text); } .sys-opt .sys-sw i { width: 10px; height: 16px; }
.set-list { margin: 0; padding-left: 16px; color: var(--soft); font-size: 11.5px; line-height: 1.55; display: grid; gap: 5px; }
.set-list.proof { padding: 0; list-style: none; gap: 8px; } .set-list.proof li { display: grid; gap: 2px; } .set-list.proof b { color: var(--text); font-weight: 500; } .set-list.proof span { color: var(--faint); font-size: 11px; }
.set-angle { display: flex; align-items: center; gap: 9px; width: 100%; border: 0; background: none; padding: 6px 4px; border-radius: 6px; text-align: left; color: var(--text); }
.set-angle:hover { background: var(--hover); } .set-angle em { font: 10.5px var(--mono); font-style: normal; color: var(--faint); } .set-angle span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-angle b { font: 600 11px var(--mono); color: var(--warn); } .set-angle b.ok { color: var(--ok); }
.set-more { display: flex; gap: 6px; flex-wrap: wrap; }
.set-refine { display: grid; gap: 6px; } .set-refine .btn { justify-self: end; }
.set-crit { padding: 0 12px; } .set-crit .critique { margin: 12px 0 0; } .set-crit .voices { grid-template-columns: repeat(2, 1fr); gap: 8px 14px; }
.set-crit .critique-head { flex-wrap: wrap; row-gap: 8px; } .set-crit .verdict { white-space: nowrap; } .set-crit .rounds { margin-left: 0; flex-basis: 100%; }
.set-back { padding: 10px 14px 0; }
.set-row .set-thumb { background: var(--ai); color: #fff; display: grid; place-items: center; }
.set-row .spin { margin-right: 4px; }
.set-crumb { font-weight: 500; color: var(--soft); } .set-crumb:hover { color: var(--text); }
.set-lead { margin: 0 0 16px; line-height: 1.55; color: var(--soft); }
/* the review sheet's two ways to start */
.na-ways { display: grid; grid-template-columns: 1.25fr 1fr; gap: 10px; margin-bottom: 12px; }
.na-way { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-content: start; text-align: left; padding: 13px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--raised2); color: var(--text); transition: border-color var(--fast), background var(--fast); }
.na-way > span:not(.na-way-ico), .na-way > em { grid-column: 2; } .na-way > span:not(.na-way-ico) { color: var(--soft); font-size: 11.5px; line-height: 1.5; }
.na-way b { font-size: 12.5px; align-self: center; } .na-way em { font-style: normal; font-size: 11px; color: var(--warn); }
.na-way:hover:not(:disabled) { border-color: var(--line3); } .na-way.on { border-color: var(--accent); background: linear-gradient(180deg, var(--accent-soft), transparent), var(--raised2); }
.na-way.off { opacity: .6; cursor: default; }
.na-way-ico { grid-row: span 2; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--well); color: var(--soft); }
.na-way-ico.ai { background: var(--ai); color: #fff; }
.na-ai { margin-top: 4px; }
/* the look: five tiles, each the brand worn one way (its page, its ink, its brand colour) */
.looks { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; margin-bottom: 10px; }
.look { display: grid; gap: 4px; justify-items: center; padding: 0; border: 0; background: none; color: var(--soft); font: 500 10px var(--sans); cursor: default; }
.look i { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 1; border-radius: 7px; font: 600 13px var(--sans); font-style: normal; box-shadow: inset 0 0 0 1px var(--line); }
.look i b { position: absolute; right: 5px; bottom: 5px; width: 7px; height: 7px; border-radius: 50%; }
.look.on i { box-shadow: 0 0 0 2px var(--accent); } .look.on span { color: var(--text); }
.look:hover i { box-shadow: inset 0 0 0 1px var(--line), 0 0 0 2px var(--line); } .look.on:hover i { box-shadow: 0 0 0 2px var(--accent); }
/* the gallery's look picker: 'Any' (as each template was designed), then the brand worn five ways, then a finish */
.lookpick { display: flex; align-items: center; gap: 4px; }
.lookpick .lk { position: relative; width: 26px; height: 22px; padding: 0; border-radius: 5px; border: 0; font: 600 9.5px var(--sans); box-shadow: inset 0 0 0 1px var(--line2); cursor: default; }
.lookpick .lk.as { width: auto; padding: 0 7px; background: var(--well); color: var(--soft); }
.lookpick .lk b { position: absolute; right: 3px; bottom: 3px; width: 5px; height: 5px; border-radius: 50%; }
.lookpick .lk.on { box-shadow: 0 0 0 2px var(--accent); } .lookpick .lk.as.on { color: var(--text); }
.lookpick select { width: auto; margin-left: 4px; }
.tcard-body .needs { font: 500 10.5px var(--sans); color: var(--warn); }

/* ---------- Plan & AI: the account, credits, plans, your own key, quality; the design-count chooser ---------- */
.signin { display: grid; gap: 6px; } .signin > p.soft { margin: 0 0 4px; font-size: 12px; line-height: 1.5; }
.signin .row { display: flex; gap: 8px; align-items: center; } .signin .input { flex: 1; min-width: 0; }
.signin .input.code { flex: 0 0 150px; font: 15px var(--mono); letter-spacing: .3em; text-align: center; }
.agree { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; line-height: 1.5; color: var(--soft); cursor: pointer; } .agree input { margin: 2px 0 0; flex: none; accent-color: var(--sel); }
.agree a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line2); text-underline-offset: 2px; }
/* signing in on the Mac with Google, in the browser (its mark an image: Google's colours stay out of the tokens) */
.signin-or { display: flex; align-items: center; gap: 12px; margin: 4px 0; color: var(--faint); font-size: 12px; } .signin-or::before, .signin-or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.g-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; } .g-btn img { width: 16px; height: 16px; }
.signin-away { display: flex; align-items: center; gap: 12px; color: var(--soft); font-size: 13px; } .signin-away .spinner { width: 16px; height: 16px; flex: none; } .signin-away .link { margin-left: auto; }
/* buying from the Mac: on the web's buy page */
.buy-web { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; } .buy-web .soft { font-size: 12px; }
.forget p { margin: 8px 0; font-size: 12px; line-height: 1.5; } .forget .row { display: flex; gap: 8px; align-items: center; } .forget .input { flex: 1; min-width: 0; }
.acct { display: grid; gap: 12px; padding: 14px; border-radius: var(--r-lg); background: var(--raised2); border: 1px solid var(--line); margin-bottom: 14px; }
.acct-head { display: flex; align-items: center; gap: 10px; } .acct-head > div { display: grid; gap: 1px; min-width: 0; } .acct-head b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .acct-head .soft { font-size: 11.5px; }
.acct-ico { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--raised2); color: var(--soft); flex: none; }
.credits { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--line); }
.credits > b { font: 600 26px/1 var(--display); letter-spacing: -.02em; } .credits > span { color: var(--soft); } .credits em { font-style: normal; font-size: 11px; }
.plan-when { justify-self: start; margin-bottom: 8px; }
/* the packs of minutes: the price large, what a minute costs under the name; at Create, the wait for a payment */
.packs .plan-card em { font: 600 20px/1.2 var(--display); letter-spacing: -.01em; margin: auto 0 8px; }
.buy-wait { display: grid; justify-items: center; gap: 16px; padding: 8px 0; } .buy-wait .spinner { margin: 8px auto; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.plan-card { display: flex; flex-direction: column; gap: 5px; padding: 12px; border-radius: 11px; background: var(--raised); border: 1px solid var(--line2); }
.plan-card span { color: var(--soft); font-size: 11.5px; line-height: 1.5; } .plan-card em { font-style: normal; font-size: 12px; color: var(--text); margin: auto 0 6px; padding-top: 2px; } .plan-card .btn { align-self: flex-start; }
.ownkey { display: grid; gap: 4px; margin-bottom: 8px; } .ownkey > .seg { justify-self: start; margin-bottom: 10px; } .ownkey .notice { margin: 8px 0 0; }
.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.tier { display: grid; gap: 3px; text-align: left; padding: 10px 12px; border-radius: 10px; background: var(--raised2); border: 1px solid var(--line); transition: border-color var(--fast), background var(--fast); }
.tier:hover { border-color: var(--line3); } .tier.on { border-color: var(--accent-line); background: var(--accent-soft); }
.tier b { font-weight: 600; } .tier span { color: var(--soft); font-size: 11px; line-height: 1.45; } .tier em { font-style: normal; font-size: 11px; color: var(--faint); } .tier.on em { color: var(--text); }
.howmany { display: grid; gap: 2px; } .howmany .fld { margin-bottom: 10px; } .howmany .seg em { font-style: normal; color: var(--faint); font-size: 10.5px; }
.howmany-note { margin: 0 0 12px; } .howmany-note b.warn { font-weight: 600; }
.counts { display: flex; gap: 6px; flex-wrap: wrap; }
.count { display: grid; justify-items: center; gap: 1px; min-width: 64px; padding: 8px 10px 7px; border-radius: 10px; background: var(--raised2); border: 1px solid var(--line); transition: border-color var(--fast), background var(--fast), transform var(--fast); }
.count b { font: 600 18px/1.1 var(--display); } .count span { font-size: 10.5px; color: var(--faint); white-space: nowrap; }
.count:hover { border-color: var(--line3); } .count:active { transform: translateY(.5px); }
.count.on { border-color: var(--accent-line); background: var(--accent-soft); } .count.on span { color: var(--text); }
.count.over { opacity: .5; } .count.over.on { opacity: 1; border-color: rgba(245, 185, 77, .6); background: rgba(245, 185, 77, .1); }
.counts.sm .count { min-width: 44px; padding: 5px 8px 4px; border-radius: 8px; } .counts.sm .count b { font-size: 13px; }
.gate { padding: 12px; border-radius: var(--r-lg); background: var(--raised2); border: 1px solid var(--line); margin-bottom: 14px; }
.na-ai { display: grid; gap: 4px; margin-top: 12px; } .na-ai .signin { padding: 12px; border-radius: var(--r-lg); background: var(--raised2); border: 1px solid var(--line); margin-bottom: 8px; }
.set-more { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------- an explainer (xstage.js, xtimeline.js, xscenes.js, xinspector.js, xnew.js, xexport.js) ---------- */
/* the film, fitted between the panels and above its timeline (the frame is the page the export renders) */
.x-stage { position: absolute; left: 260px; right: 280px; top: 8px; bottom: 216px; display: grid; place-items: center; padding: 30px 20px 14px; container-type: size; }
.ui-hidden .x-stage { left: 0; right: 0; bottom: 0; }
.x-frame { position: relative; width: min(100cqw, calc(100cqh * var(--ar, 1.7778))); border-radius: 4px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 24px 60px rgba(0, 0, 0, .45); background: #0c0c0f; }
.x-frame iframe { display: block; width: 100%; height: 100%; border: 0; border-radius: 4px; transition: opacity .3s; } .x-frame iframe.loading { opacity: 0; }
.x-label { left: 0; top: -22px; pointer-events: none; } .x-label span { color: var(--faint); font-family: var(--mono); font-size: 10.5px; }
.x-catch { position: absolute; inset: 0; cursor: pointer; }
/* its timeline: the scenes, the voice line by line, the music */
.x-timeline { height: 200px; }
.x-ruler span { position: absolute; top: 7px; padding-left: 4px; font: 10px var(--mono); color: var(--faint); white-space: nowrap; pointer-events: none; }
.x-ruler span::before { content: ""; position: absolute; left: 0; top: -7px; width: 1px; height: 6px; background: var(--line3); }
.x-lane-scenes { height: 40px; } .x-lane-voice { height: 24px; } .x-lane-music { height: 20px; }
.x-scene { cursor: pointer; } .x-scene .tl-scene-t { left: 9px; }
.x-line { position: absolute; top: 0; height: 100%; display: flex; align-items: center; padding: 0 7px; border-radius: var(--r-sm); overflow: hidden; cursor: pointer;
  background: rgba(74, 222, 128, .1); border: 1px solid rgba(74, 222, 128, .3); color: #c6f6d5; font-size: 11px; white-space: nowrap; }
.x-line span { overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.x-line.estimated { background: none; border: 1px dashed rgba(255, 255, 255, .2); color: var(--faint); }
.x-bed { position: absolute; top: 0; height: 100%; display: flex; align-items: center; padding: 0 8px; border-radius: var(--r-sm); background: var(--accent-soft); box-shadow: inset 0 0 0 1px rgba(124, 109, 250, .3); color: var(--accent-text); font-size: 11px; white-space: nowrap; }
.x-head { position: absolute; left: 0; top: 0; bottom: 0; width: 0; z-index: 6; will-change: transform; pointer-events: none; }
.x-head::before { content: ""; position: absolute; top: 0; bottom: 0; left: -1px; width: 2px; background: #ff4f5e; box-shadow: 0 0 6px rgba(255, 79, 94, .5); }
.x-music { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; } .x-music .ico { color: var(--faint); }
.x-busy { display: inline-flex; align-items: center; gap: 8px; color: var(--soft); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* its scenes, where a design's layers would be */
.x-srow { cursor: pointer; } .x-snum { width: 16px; text-align: right; font: 11px var(--mono); color: var(--faint); flex: none; }
.x-sdur { font: 11px var(--mono); color: var(--faint); flex: none; } .x-film .layer-name { font-weight: 500; }
.x-todo { width: 6px; height: 6px; border-radius: 50%; background: var(--warn); flex: none; }
/* design mode: every scene as a frame on a canvas behind the panels (xdesign.js); the film's frame waits, hidden */
.x-stage.away, .xd-wrap.away { visibility: hidden; pointer-events: none; }
.xd-wrap { position: absolute; inset: 0; }
.xd-canvas { position: absolute; inset: 0; overflow: hidden; background: var(--canvas); touch-action: none; user-select: none; -webkit-user-select: none; }
.xd-canvas.hand, .xd-canvas.hand * { cursor: grab !important; } .xd-canvas.panning, .xd-canvas.panning * { cursor: grabbing !important; }
.xd-board { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; pointer-events: none; transition: opacity .25s; } .xd-board.loading { opacity: 0; }
.xd-over { position: absolute; inset: 0; pointer-events: none; }
.xd-label { cursor: default; }
.xd-wait { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
/* …and its panels: a scene's elements as layers under its row, the element picked */
.x-srow.within { background: var(--hover); }
.xd-row { height: 26px; gap: 6px; cursor: default; } .xd-row .layer-name { color: var(--soft); } .xd-row.on .layer-name { color: var(--text); }
.xd-row .layer-name i { font-style: normal; color: var(--faint); margin-left: 6px; }
.xd-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); flex: none; margin-left: 6px; vertical-align: middle; }
.xd-reset { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; } .xd-reset .hint { margin: 0; }
.xd-aside { display: inline-flex; align-items: center; gap: 10px; }
.xd-swatches { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.xd-sw { width: 22px; height: 22px; padding: 0; border: 0; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.xd-sw.on { box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent); }
.xd-swatches .color { flex: 1 1 120px; }
/* Settings: what the account used, folded */
.used { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 8px; }
.used summary { cursor: default; color: var(--soft); font-size: 12px; list-style: none; display: flex; align-items: center; gap: 6px; }
.used summary::-webkit-details-marker { display: none; } .used summary::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid var(--faint); border-bottom: 1.5px solid var(--faint); transform: rotate(-45deg); margin-left: 2px; }
.used[open] summary::after { transform: rotate(45deg); } .used summary:hover { color: var(--text); }
.used-list { margin-top: 6px; display: grid; gap: 2px; }
.used-row { display: grid; grid-template-columns: 1fr auto 64px; gap: 12px; align-items: baseline; font-size: 12px; padding: 4px 0; }
.used-row span { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .used-row em { font-style: normal; color: var(--faint); font: 11px var(--mono); } .used-row b { font-weight: 500; color: var(--soft); text-align: right; font: 11px var(--mono); }
.seg.modes { margin-right: 8px; }
/* the Design panel */
.ins-tabs .x-back { margin: 0 0 0 auto; padding: 0; font-weight: 500; color: var(--accent); }
.x-num { font: 600 11px var(--mono); color: var(--text); background: var(--raised2); border-radius: 5px; height: 20px; }
.x-use { margin: 2px 0 0; font-size: 11px; }
.x-linef { margin-bottom: 9px; } .x-linef textarea { width: 100%; resize: vertical; min-height: 44px; line-height: 1.45; }
.x-linef-head { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; font: 10.5px var(--mono); color: var(--faint); } .x-linef-head .mini { opacity: 1; }
.x-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex: none; } .x-linef.est .x-dot { background: none; box-shadow: inset 0 0 0 1.5px var(--faint); }
.x-fact { font: 10px var(--mono); color: var(--accent-text); background: var(--accent-soft); border-radius: 4px; padding: 1px 5px; cursor: help; flex: none; }
.x-text { position: relative; flex: 1; display: flex; min-width: 0; } .x-text > .input { flex: 1; width: 100%; padding-right: 42px; } .x-text > textarea { resize: vertical; }
.x-count { position: absolute; right: 6px; bottom: 6px; font: 9.5px var(--mono); font-style: normal; color: var(--faint); pointer-events: none; } .x-count.over { color: var(--danger); }
.x-list { margin: 2px 0 10px; } .x-list-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; } .x-list-head b { font-size: 11px; color: var(--soft); font-weight: 600; } .x-list-head .soft { flex: 1; font-size: 10.5px; }
.x-item { border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px 1px; margin-bottom: 6px; background: rgba(255, 255, 255, .015); }
.x-item-head { display: flex; align-items: center; gap: 2px; margin-bottom: 4px; } .x-item-head span { flex: 1; font: 10.5px var(--mono); color: var(--faint); } .x-item .mini { opacity: 1; font-size: 11px; }
.x-group { padding: 2px 0 0; }
.x-iconpick, .x-voicepick { position: relative; flex: 1; min-width: 0; }
.x-glyph { width: 34px; height: 24px; display: grid; place-items: center; background: var(--canvas); border-radius: 3px; color: var(--text); flex: none; }
.x-iconsearch { width: 100%; margin-bottom: 8px; }
.x-icons { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; max-height: 264px; overflow: auto; }
.x-ic { border: 0; background: none; color: var(--soft); height: 32px; border-radius: 6px; display: grid; place-items: center; } .x-ic:hover { background: var(--hover); color: var(--text); } .x-ic.on { background: var(--accent-soft); color: var(--text); }
.x-voices { display: grid; gap: 2px; max-height: 300px; overflow: auto; }
.x-voices h4 { color: var(--faint); font-size: 11px; font-weight: 500; margin: 8px 7px 2px; } .x-voices h4:first-child { margin-top: 0; }
.x-voice { display: flex; align-items: center; gap: 4px; border-radius: 6px; } .x-voice.on { background: var(--accent-soft); } .x-voice .mini { opacity: 1; margin-right: 6px; }
.x-voice-pick { flex: 1; min-width: 0; display: grid; gap: 1px; text-align: left; border: 0; background: none; padding: 5px 7px; border-radius: 6px; } .x-voice-pick:hover { background: var(--hover); }
.x-voice-pick b { font-weight: 600; } .x-voice-pick span { font-size: 10.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.x-record { width: 100%; margin-top: 8px; } .x-recorded { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; } .x-recorded .link.small { margin: 0; }
.x-styles { display: grid; gap: 2px; } .x-styles.wide { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.x-style { display: flex; gap: 10px; align-items: center; text-align: left; padding: 5px 6px; border-radius: var(--r); background: none; border: 1px solid transparent; color: var(--text); transition: border-color var(--fast), background var(--fast); }
.x-style:hover { background: var(--hover); } .x-style.on { border-color: var(--accent-line); background: var(--accent-soft); }
.x-style > span { display: grid; gap: 2px; min-width: 0; } .x-style b { font-weight: 500; } .x-style b em { font-style: normal; font-weight: 400; font-size: 11px; }
.x-style small { font-size: 11.5px; color: var(--soft); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.x-oneline .sec-head { margin-bottom: 0; } .x-val { color: var(--soft); font-size: 12.5px; }
.x-foldhead { width: 100%; border: 0; background: none; padding: 0; margin: 0; color: var(--text); text-align: left; cursor: pointer; } .x-fold.open .x-foldhead { margin-bottom: 10px; }
.x-foldhead .ico { color: var(--faint); transform: rotate(-90deg); transition: transform var(--fast); } .x-fold.open .x-foldhead .ico { transform: none; } .x-foldhead:hover h4 { color: var(--text); }
.x-fold:not(.open) .x-foldhead h4 { color: var(--soft); font-weight: 500; }
.x-count-n { font: 11.5px var(--mono); color: var(--faint); margin-left: 6px; }
.x-empty { display: grid; gap: 10px; justify-items: start; padding: 12px; border-radius: var(--r); background: var(--well); border: 1px solid var(--line); color: var(--soft); font-size: 12.5px; line-height: 1.5; }
.x-sw { display: grid; grid-template-columns: 1fr 1fr; width: 26px; height: 26px; border-radius: 6px; overflow: hidden; flex: none; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12); } .x-sw b { display: block; }
.x-facts { display: grid; gap: 8px; max-height: 280px; overflow: auto; } .x-factrow { display: flex; gap: 8px; align-items: baseline; font-size: 12px; color: var(--soft); line-height: 1.45; }
.x-source { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--soft); margin-bottom: 6px; } .x-source span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .x-source .ico { color: var(--faint); }
.x-scene-actions { display: flex; gap: 6px; padding: 12px; }
/* a new explainer */
.sheet.x-new { width: min(860px, 93vw); height: auto; }
.x-from { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.x-fromb { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 13px; border-radius: 8px; border: 1px solid var(--line2); background: var(--raised2); color: var(--soft); transition: border-color var(--fast), color var(--fast), background var(--fast); }
.x-fromb:hover { color: var(--text); border-color: var(--line3); } .x-fromb.on { border-color: var(--accent-line); background: var(--accent-soft); color: var(--text); }
.x-urls { display: grid; gap: 6px; justify-items: start; } .x-urls .row { margin: 0; width: 100%; gap: 6px; } .x-urls .input { flex: 1; } .x-urls .link.small { margin: 0; }
.x-files { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .x-files .hint { margin: 0 0 0 4px; }
.x-file { display: inline-flex; align-items: center; gap: 6px; padding: 3px 3px 3px 8px; border-radius: 6px; background: var(--raised2); border: 1px solid var(--line); max-width: 280px; } .x-file span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.x-story { display: flex; flex-direction: column; gap: 3px; padding: 9px 10px; border-radius: var(--r-sm); background: var(--raised2); border: 1px solid var(--line); font-size: 12px; }
.x-story b { font-weight: 600; }
.x-story span { color: var(--soft); line-height: 1.4; }
.x-themegroups { display: grid; gap: 12px; } .x-themehead { font-size: 12px; color: var(--faint); margin-bottom: 6px; }
.x-themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 6px; }
.x-theme { display: grid; gap: 6px; padding: 6px; border-radius: var(--r); background: none; border: 1px solid var(--line); text-align: left; transition: border-color var(--fast), background var(--fast); }
.x-theme:hover { border-color: var(--line3); } .x-theme.on { border-color: var(--accent-line); background: var(--accent-soft); }
.x-theme i { display: flex; height: 16px; border-radius: 4px; overflow: hidden; box-shadow: 0 0 0 1px rgba(255, 255, 255, .1); } .x-theme i b { flex: 1; display: block; }
.x-theme span { font-size: 12px; line-height: 1.2; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .x-theme.on span { color: var(--text); }
.x-src.theme { color: var(--accent); }
.x-look { display: grid; gap: 5px; }
.x-role { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 8px; } .x-role .f-label { font-size: 11px; }
.x-revise { display: flex; align-items: center; gap: 12px; margin-top: 8px; font-size: 11px; color: var(--faint); }
.x-lang { flex: none; display: flex; align-items: baseline; gap: 12px; } .x-lang .link.small { margin: 0; }
.x-clip { display: grid; gap: 8px; } .x-clipt { display: flex; align-items: center; gap: 8px; } .x-clipt .input { width: 72px; } .x-clipt span { font-size: 12px; color: var(--faint); }
/* a logo on a light check, where a dark wordmark and a white one both show */
.x-logo { margin-bottom: 8px; } .x-logo .link.small { margin: 0; justify-self: end; } .x-logo .btn { justify-self: start; }
.x-logo img { justify-self: start; height: 32px; min-width: 0; max-width: 100%; object-fit: contain; padding: 4px 8px; border-radius: var(--r-sm); background: repeating-conic-gradient(var(--text) 0 25%, var(--soft) 0 50%) 0 0 / 8px 8px; }
.x-src { font-size: 10px; color: var(--faint); white-space: nowrap; display: inline-flex; gap: 4px; align-items: baseline; } .x-src.brand { color: var(--accent-text); } .x-src.yours { color: var(--warn); } .x-src .link.small { margin: 0; font-size: 10px; }
.x-style.card { flex-direction: column; gap: 0; padding: 0; overflow: hidden; } .x-style.card > span { padding: 9px 11px 11px; }
.x-prev { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: 1px solid var(--line); }
.x-thumb { width: 56px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 4px; flex: none; box-shadow: 0 0 0 1px var(--line2); }
.add-ways.three { grid-template-columns: repeat(3, 1fr); }
.swatch-in { width: 34px; height: 30px; padding: 0; border: 1px solid var(--line2); border-radius: 7px; background: none; cursor: pointer; } .swatch-in::-webkit-color-swatch-wrapper { padding: 3px; } .swatch-in::-webkit-color-swatch { border: 0; border-radius: 4px; }

/* ---------- the front door (xchat.js): the box, one question at most, the plan in a line, your videos ---------- */
.xc-home { max-width: 760px; margin: 0 auto; padding-bottom: 56px; }
.xc-hero { padding: 12vh 0 0; text-align: center; } .xc-hero h1 { font-size: 28px; line-height: 1.25; letter-spacing: -.025em; margin-bottom: 20px; }
.xc-modes { margin-bottom: 16px; } .xc-modes button { padding: 4px 14px; min-height: 28px; font-size: 13px; }
.xc-start { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 2px; }
.xc-startbtn { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--line2); background: var(--raised); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.xc-startbtn:hover { background: var(--raised2); } .xc-startbtn .ico { color: var(--soft); }
.xc-composer { text-align: left; background: var(--panel); border: 1px solid var(--line2); border-radius: var(--r-xl); padding: 14px 14px 10px 16px; transition: border-color var(--fast), box-shadow var(--fast); }
.xc-composer:focus-within { border-color: var(--line3); box-shadow: 0 0 0 4px rgba(255, 255, 255, .03); }
.xc-composer textarea { display: block; width: 100%; border: 0; outline: none; background: none; resize: none; font-size: 15px; line-height: 1.55; padding: 0 2px; min-height: 56px; max-height: 320px; overflow-y: auto; }
.xc-composer textarea::placeholder { color: var(--faint); }
.xc-composer.small { border-radius: var(--r-lg); padding: 10px 10px 8px 14px; } .xc-composer.small textarea { font-size: 13.5px; min-height: 22px; max-height: 160px; }
.xc-bar { display: flex; align-items: center; gap: 6px; margin-top: 8px; } .xc-bar .error { font-size: 12px; } .xc-bar > .icon-btn { flex: none; }
.xc-send { width: 30px; height: 30px; border-radius: 50%; border: 0; display: grid; place-items: center; background: #ededef; color: #09090b; flex: none; transition: background var(--fast), opacity var(--fast); }
.xc-send:disabled { background: var(--raised2); color: var(--ghost); cursor: default; } .xc-send:not(:disabled):hover { background: #fff; }
.xc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 2px; }
.xc-file { display: inline-flex; align-items: center; gap: 6px; max-width: 260px; height: 28px; padding: 0 4px 0 9px; border-radius: var(--r-sm); background: var(--raised2); border: 1px solid var(--line); font-size: 12px; color: var(--text); }
.xc-file .ico { color: var(--soft); } .xc-file > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .xc-file.soft { color: var(--soft); padding-right: 9px; }
.xc-file .mini { opacity: 1; width: 20px; height: 20px; place-items: center; border-radius: 4px; } .xc-file .mini:hover { background: var(--hover); }
.xc-suggest { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
/* the model picker in the box */
.xc-pick { position: relative; } .xc-pickbtn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; height: 30px; padding: 0 8px; border-radius: var(--r-sm); color: var(--soft); font-size: 12.5px; }
.xc-pickbtn:hover { background: var(--hover); color: var(--text); } .xc-pickbtn b { font-weight: 500; color: var(--text); } .xc-pickbtn .ico { color: var(--faint); }
.xc-menu { position: absolute; right: 0; bottom: calc(100% + 6px); z-index: 30; width: 300px; max-height: 420px; overflow: auto; padding: 4px; border-radius: var(--r-lg); background: var(--raised); box-shadow: var(--shadow-pop); animation: pop var(--fast) var(--ease); }
.xc-menu.down { bottom: auto; top: calc(100% + 6px); }
.xc-add { position: relative; flex: none; } .xc-addmenu { left: 0; right: auto; width: 248px; }
.xc-additem { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 8px; border-radius: var(--r-sm); color: var(--text); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.xc-additem:hover { background: var(--press); } .xc-additem .ico { color: var(--soft); flex: none; }
.xc-rec { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; color: var(--soft); }
.xc-rec b { font: 500 13px var(--mono); color: var(--text); } .xc-rec .progress { flex: 1; } .xc-rec .grow { flex: 1; }
.xc-recdot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: xc-rec 1.2s var(--ease) infinite alternate; }
@keyframes xc-rec { to { opacity: .35; } }
.xc-menuhead { font-size: 12px; font-weight: 500; color: var(--faint); padding: 8px 8px 4px; }
.xc-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1px 10px; align-items: center; width: 100%; text-align: left; border: 0; background: none; padding: 7px 8px; border-radius: var(--r-sm); color: var(--text); }
.xc-item:hover { background: var(--press); } .xc-item b { font-weight: 500; } .xc-item small { grid-column: 1; color: var(--faint); font-size: 12px; line-height: 1.4; }
.xc-item em { grid-row: 1; grid-column: 2; font-style: normal; font: 11.5px var(--mono); color: var(--faint); } .xc-item .ico { grid-row: 1 / span 2; grid-column: 2; color: var(--text); }
/* the thread */
.xc-thread { display: grid; gap: 20px; padding-top: 32px; }
.xc-me { display: flex; justify-content: flex-end; } .xc-bubble { max-width: 80%; background: var(--raised2); border-radius: var(--r-xl); padding: 10px 14px; }
.xc-bubble p { margin: 0; white-space: pre-wrap; line-height: 1.55; font-size: 14px; } .xc-bubble .xc-chips { margin: 8px 0 0; }
.xc-ai { display: flex; gap: 12px; align-items: flex-start; } .xc-ai > img { width: 20px; height: 20px; margin-top: 2px; flex: none; }
.xc-ai > div { display: grid; gap: 6px; min-width: 0; } .xc-ai p { margin: 0; font-size: 14px; line-height: 1.6; } .xc-ai .xc-read { font-size: 12.5px; color: var(--faint); }
.xc-q { margin-left: 32px; display: grid; gap: 10px; } .xc-q > b { font-weight: 500; font-size: 13.5px; }
.xc-opts { display: flex; flex-wrap: wrap; gap: 6px; } .xc-opts .chip { height: 30px; padding: 0 12px; font-size: 13px; }
.xc-other { max-width: 420px; }
/* the choices in the box: a name in grey while on Auto, the value once set; their options in pop-overs */
.xc-choices { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; min-width: 0; }
.xc-pc { position: relative; }
.xc-pcbtn { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 7px 0 9px; border-radius: var(--r-sm); border: 1px solid var(--line); background: none; color: var(--text); font-size: 12.5px; font-weight: 500; transition: border-color var(--fast), background var(--fast), color var(--fast); }
.xc-pcbtn:hover, .xc-pcbtn.open { border-color: var(--line3); background: var(--hover); } .xc-pcbtn.auto { color: var(--soft); font-weight: 400; } .xc-pcbtn.auto:hover, .xc-pcbtn.auto.open { color: var(--text); }
.xc-pcbtn .ico { color: var(--faint); } .xc-pcbtn i { display: flex; width: 24px; height: 12px; border-radius: 3px; overflow: hidden; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12); } .xc-pcbtn i b { flex: 1; }
.xc-pop { position: absolute; left: 0; top: calc(100% + 6px); z-index: 30; min-width: 240px; max-width: 380px; max-height: min(560px, 70vh); overflow: auto; padding: 4px; border-radius: var(--r-lg); background: var(--raised); box-shadow: var(--shadow-pop); animation: pop var(--fast) var(--ease); }
.xc-pop.wide { width: 380px; } .xc-pop.up { top: auto; bottom: calc(100% + 6px); }
.xc-pophead { font-size: 12px; font-weight: 500; color: var(--faint); padding: 10px 8px 4px; margin-top: 4px; border-top: 1px solid var(--line); }
.xc-popthemes { padding: 4px 4px 6px; }
.xc-go { margin-left: 32px; display: flex; align-items: center; gap: 12px; } .xc-go .btn.primary { height: 32px; padding: 0 14px; } .xc-go .soft { font-size: 12.5px; }
.xc-styles { display: grid; gap: 4px; }
.xc-style { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 2px 12px; align-items: center; text-align: left; border: 0; background: none; padding: 6px; border-radius: var(--r); color: var(--text); }
.xc-style:hover { background: var(--press); } .xc-style.on { background: var(--accent-soft); }
.xc-style img { grid-row: span 2; width: 88px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 5px; box-shadow: 0 0 0 1px var(--line2); } .xc-style b { font-weight: 500; } .xc-style small { color: var(--faint); font-size: 12px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.xc-note { margin: -8px 0 0 32px; font-size: 12.5px; }
.xc-working { margin-left: 32px; display: flex; align-items: center; gap: 12px; color: var(--soft); }
.xc-working .spin { border-color: var(--line3); border-top-color: var(--text); width: 14px; height: 14px; }
.xc-again { display: flex; justify-content: center; } .xc-again .btn.ghost { font-size: 12.5px; }
/* your videos */
.xc-mine { margin-top: 64px; } .xc-mine h2 { font-size: 13px; font-weight: 500; color: var(--soft); margin-bottom: 14px; }
.xc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px 16px; }
.xc-film { display: grid; gap: 10px; text-align: left; padding: 0; border: 0; background: none; color: var(--text); }
.xc-thumb { aspect-ratio: 16 / 9; border-radius: var(--r-lg); background: var(--panel); box-shadow: 0 0 0 1px var(--line); display: grid; place-items: center; color: var(--ghost); overflow: hidden; transition: box-shadow var(--fast); }
.xc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.xc-film:hover .xc-thumb { box-shadow: 0 0 0 1px var(--line3); }
.xc-filmbody { display: grid; gap: 2px; padding: 0 2px; } .xc-filmbody b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .xc-filmbody span { font-size: 12px; color: var(--faint); }
.xc-pop .x-themes { grid-template-columns: repeat(3, 1fr); }
.set-path { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 5px 8px; }
