/* Design workspace (lib/design/editor.js). Full-bleed canvas with the panels floating over it (Figma UI3 style).
   Uses the app's theme tokens from app.css, so light / dark just work. */
:root { --ds-canvas: #161617; --ds-sel: rgba(226, 253, 190, .14); --ds-comp: #a274ff; --ds-gap: 8px; --ds-lw: 248px; --ds-rw: 272px; --ds-rail: 60px; --ds-lo: calc(var(--ds-rail) + var(--ds-gap)); }
:root[data-theme="light"] { --ds-canvas: #e9e9ea; --ds-sel: rgba(226, 253, 190, .8); --ds-comp: #8a3ffc; }
html.ds-open .app { visibility: hidden; }

.ds { position: fixed; inset: 0; z-index: 40; background: var(--ds-canvas); color: var(--text); font: 11px/1.45 var(--ui-font); -webkit-font-smoothing: antialiased; }
.ds button { font: inherit; }
.ds-main { position: absolute; inset: 0; overflow: hidden; background: var(--ds-canvas); }
.ds-canvas { position: absolute; inset: 0; display: block; touch-action: none; }
.ds-left, .ds-right { position: absolute; top: var(--ds-gap); bottom: var(--ds-gap); z-index: 6; display: flex; flex-direction: column; min-height: 0; overflow: hidden; background: var(--panel); border-radius: 12px; box-shadow: var(--card-shadow); }
.ds-left { left: calc(var(--ds-gap) + var(--ds-lo)); width: var(--ds-lw); }
.ds-right { right: var(--ds-gap); width: var(--ds-rw); }
.ds.ui-hidden .ds-left, .ds.ui-hidden .ds-right, .ds.ui-hidden .ds-rail { display: none; }
.ds.ui-hidden { --ds-lo: 0px; }

/* heads */
.ds-head { height: 48px; flex: none; display: flex; align-items: center; gap: 2px; padding: 0 8px 0 6px; }
.ds-head.right { padding: 0 8px 0 10px; gap: 4px; }
.ds-menu-btn { width: 32px; height: 32px; padding: 0; display: grid; place-items: center; background: none; color: var(--text); border-radius: 8px; }
.ds-menu-btn:hover { background: var(--raise); }
.ds-menu-btn svg { width: 16px; height: 16px; }
.ds-file-meta { display: grid; min-width: 0; flex: 1; margin-left: 2px; }
.ds-file { background: none; border: 0; outline: none; padding: 1px 5px; border-radius: 5px; color: var(--text); font: 600 12px/1.35 var(--ui-font); min-width: 0; letter-spacing: -.005em; }
.ds-file:hover, .ds-file:focus { background: var(--field); }
.ds-file-meta small { color: var(--muted); padding: 0 5px; font-size: 10.5px; }
.ds-spacer { flex: 1; }
.ds-icon { width: 28px; height: 28px; padding: 0; display: grid; place-items: center; background: none; color: var(--soft); border-radius: 7px; flex: none; }
.ds-icon:hover { background: var(--raise); color: var(--text); }
.ds-icon.on { background: var(--raise); color: var(--text); }
.ds-icon.sm { width: 24px; height: 24px; border-radius: 6px; }
.ds-icon svg { width: 16px; height: 16px; }
.ds-icon.sm svg { width: 14px; height: 14px; }
.ds-zoom { display: flex; align-items: center; gap: 3px; height: 28px; padding: 0 6px; background: none; color: var(--soft); font-variant-numeric: tabular-nums; border-radius: 7px; }
.ds-zoom:hover { background: var(--raise); color: var(--text); }
.ds-zoom svg { width: 8px; height: 8px; }
.ds-primary { height: 28px; background: var(--accent); color: var(--accent-ink); font-weight: 600; padding: 0 12px; border-radius: 7px; margin-left: 2px; }
.ds-primary:hover { background: var(--accent-hover); color: #fff; }
.ds-primary.live { background: var(--raise); color: var(--text); box-shadow: inset 0 0 0 1px var(--line2); }
.ds-faces { display: flex; flex-direction: row-reverse; padding-left: 6px; }
.ds-faces .lb-avatar { border-color: var(--panel); }

/* tabs */
.ds-tabs { flex: none; display: flex; gap: 2px; padding: 0 8px 6px; border-bottom: 1px solid var(--line); }
.ds-tabs button { height: 26px; background: none; padding: 0 9px; color: var(--muted); font-weight: 600; border-radius: 6px; }
.ds-tabs button.on { color: var(--text); background: var(--raise); }
.ds-tabs button:hover { color: var(--text); }

/* pages + layers */
.ds-pages { flex: none; padding: 6px 8px 8px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); max-height: 30%; overflow: auto; }
.ds-pages + .ds-tabs { padding-top: 6px; }
.ds-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 4px; min-height: 28px; padding: 0 2px 0 8px; color: var(--text); font-weight: 600; }
.ds-sec-head > span { flex: 1; }
.ds-sec-head.sub { color: var(--muted); margin-top: 6px; }
.ds-page { display: flex; align-items: center; height: 28px; padding: 0 8px; border-radius: 6px; color: var(--soft); cursor: default; }
.ds-page:hover { background: var(--raise); }
.ds-page.on { color: var(--text); font-weight: 600; }
.ds-layers { flex: 1; min-height: 0; overflow: auto; padding: 6px 6px 16px; scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }
.ds-row { position: relative; display: flex; align-items: center; gap: 2px; height: 30px; padding-right: 4px; border-radius: 6px; color: var(--text); cursor: default; user-select: none; }
.ds-row:hover, .ds-row.hover { background: var(--raise); }
.ds-row.hover:not(.sel) { box-shadow: inset 0 0 0 1px var(--accent-line); }
.ds-row.sel { background: var(--ds-sel); }
.ds-row.off .ds-name, .ds-row.off .ds-type { opacity: .4; }
.ds-row.comp .ds-type, .ds-row.comp .ds-name { color: var(--ds-comp); }
.ds-row.inst .ds-name { color: var(--soft); }
.ds-row.inst.sel .ds-name { color: var(--text); }
.ds-row[data-drop="above"]::before, .ds-row[data-drop="below"]::after { content: ""; position: absolute; left: 8px; right: 4px; height: 2px; background: var(--accent); border-radius: 1px; }
.ds-row[data-drop="above"]::before { top: -1px; } .ds-row[data-drop="below"]::after { bottom: -1px; }
.ds-row[data-drop="in"] { box-shadow: inset 0 0 0 2px var(--accent-line); }
.ds-caret { width: 16px; height: 16px; padding: 0; background: none; color: var(--muted); display: grid; place-items: center; flex: none; }
.ds-caret svg { width: 10px; height: 10px; transition: transform .12s; }
.ds-caret.open svg { transform: rotate(90deg); }
.ds-caret:hover { background: none; color: var(--text); }
.ds-type { width: 16px; height: 16px; display: grid; place-items: center; color: var(--soft); flex: none; font-style: normal; }
.ds-type svg { width: 14px; height: 14px; }
.ds-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 4px; }
.ds-tog { width: 22px; height: 22px; padding: 0; display: grid; place-items: center; background: none; color: var(--muted); visibility: hidden; flex: none; border-radius: 5px; }
.ds-tog svg { width: 14px; height: 14px; }
.ds-row:hover .ds-tog, .ds-tog.keep, .ds-row.off .ds-tog:last-child { visibility: visible; }
.ds-tog:hover { background: var(--fill); color: var(--text); }
.ds-rename { flex: 1; min-width: 0; background: var(--field); border: 1px solid var(--accent-line); border-radius: 5px; padding: 3px 5px; color: var(--text); outline: none; font: inherit; }
.ds-empty { color: var(--muted); padding: 8px 10px; margin: 0; line-height: 1.55; }
.ds-asset-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 2px 4px 8px; }
.ds-asset { display: grid; gap: 6px; padding: 6px; background: none; color: var(--soft); text-align: left; border-radius: 8px; }
.ds-asset span { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-asset:hover { background: var(--raise); color: var(--text); }
.ds-asset-thumb { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; border-radius: 6px; background: var(--ds-canvas); box-shadow: inset 0 0 0 1px var(--line); }

/* text being edited: in place, styled like the layer */
.ds-text-edit { position: absolute; left: 0; top: 0; transform-origin: 0 0; margin: 0; padding: 0; border: 0; outline: none; background: transparent; overflow: visible; caret-color: var(--accent-line); z-index: 2; overflow-wrap: normal; word-break: normal; cursor: text; }
.ds-text-edit::selection, .ds-text-edit *::selection { background: rgba(226, 253, 190, .55); }   /* selected words: Jene lime over the text, never olive */

/* toolbar: floating at the bottom, centred between the panels */
.ds-toolbar { position: absolute; left: calc(50% + (var(--ds-lw) + var(--ds-lo) - var(--ds-rw)) / 2); bottom: 14px; transform: translateX(-50%); z-index: 5; display: flex; align-items: center; gap: 1px; padding: 4px; background: var(--panel); border-radius: 12px; box-shadow: var(--pop-shadow); }
.ds.ui-hidden .ds-toolbar { left: 50%; }
.ds-tool { width: 32px; height: 32px; padding: 0; display: grid; place-items: center; background: none; color: var(--text); border-radius: 8px; }
.ds-tool svg { width: 18px; height: 18px; }
.ds-tool:hover { background: var(--raise); }
.ds-tool.on { background: var(--accent); color: var(--accent-ink); }
.ds-tool-more { width: 14px; height: 32px; padding: 0; display: grid; place-items: center; background: none; color: var(--muted); border-radius: 5px; margin-left: -1px; }
.ds-tool-more svg { width: 8px; height: 8px; }
.ds-tool-more:hover { background: var(--raise); color: var(--text); }
.ds-sep { width: 1px; height: 20px; margin: 0 5px; background: var(--line2); }

/* workspace switch: a segmented control at the end of both toolbars */
.ws-switch { display: flex; gap: 2px; padding: 2px; background: var(--field); border-radius: 8px; }
.ws-switch button { height: 28px; padding: 0 11px; background: none; color: var(--soft); font: 600 11.5px/1 var(--ui-font); border-radius: 6px; }
.ws-switch button:hover { color: var(--text); background: none; }
.ws-switch button.on { background: var(--panel); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 0 0 .5px var(--line2); }

/* inspector */
.ds-insp { flex: 1; min-height: 0; overflow: auto; overflow-x: hidden; padding-bottom: 28px; scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }
.ds-sel-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 4px 14px; font-size: 12px; min-width: 0; }
.ds-sel-head i { display: grid; color: var(--soft); flex: none; }
.ds-sel-head svg { width: 14px; height: 14px; }
.ds-sel-head strong { font-weight: 600; flex: none; }
.ds-ell { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-sel-head.comp, .ds-sel-head.comp i { color: var(--ds-comp); }
.ds-sec { padding: 8px 12px 12px; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.ds-insp > .ds-sec:first-child { border-top-color: transparent; }
.ds-sec .ds-sec-head { padding: 0 0 0 2px; min-height: 26px; gap: 2px; }
.ds-align { display: flex; justify-content: space-between; padding: 4px 10px 8px; }
.ds-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ds-grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.ds-row2 { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ds-row2 > .ds-select, .ds-row2 > .ds-num { flex: 1; min-width: 0; }
.ds-lbl { width: 46px; flex: none; }
.ds-num { position: relative; display: flex; align-items: center; height: 28px; background: var(--field); border: 1px solid transparent; border-radius: 6px; min-width: 0; transition: border-color .12s; }
.ds-num:hover { border-color: var(--line2); }
.ds-num:focus-within { border-color: var(--accent-line); }
.ds-num-l { flex: none; min-width: 22px; padding: 0 2px 0 7px; color: var(--muted); cursor: ew-resize; user-select: none; display: grid; place-items: center; }
.ds-num-l svg { width: 14px; height: 14px; }
.ds-num input { flex: 1; min-width: 0; width: 100%; background: none; border: 0; outline: none; padding: 0 6px 0 2px; color: var(--text); font: inherit; font-variant-numeric: tabular-nums; }
.ds-num.bound { background: color-mix(in srgb, var(--ds-comp) 12%, var(--field)); }
.ds-num.bound input { color: var(--ds-comp); font-weight: 500; cursor: default; }
.ds-bind { position: absolute; right: 2px; top: 50%; width: 20px; height: 20px; margin-top: -10px; padding: 0; display: grid; place-items: center; background: var(--field); color: var(--muted); border-radius: 4px; opacity: 0; transition: opacity .12s; }
.ds-bind svg { width: 13px; height: 13px; }
.ds-num:hover .ds-bind, .ds-bind.on { opacity: 1; }
.ds-bind.on { color: var(--ds-comp); background: transparent; }
.ds-bind:hover { color: var(--text); background: var(--fill); }
.ds-select { height: 28px; min-width: 0; background: var(--field); border: 1px solid transparent; border-radius: 6px; padding: 0 6px; color: var(--text); font: inherit; outline: none; }
.ds-select:hover { border-color: var(--line2); }
.ds-select:focus { border-color: var(--accent-line); }
.ds-select.mini { width: 26px; padding: 0; color: transparent; background: var(--field) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath d='M1.5 3 4 5.5 6.5 3' fill='none' stroke='%23999' stroke-width='1.2'/%3E%3C/svg%3E") center / 8px no-repeat; flex: none; }
.ds-select.mini option { color: var(--text); }
.ds-font { height: 28px; background: var(--field); border: 1px solid transparent; border-radius: 6px; padding: 0 8px; color: var(--text); font: inherit; outline: none; width: 100%; }
.ds-font:hover { border-color: var(--line2); }
.ds-font:focus { border-color: var(--accent-line); }
.ds-seg { display: flex; gap: 1px; padding: 2px; background: var(--field); border-radius: 7px; flex: none; }
.ds-seg button { height: 24px; min-width: 26px; padding: 0 6px; display: grid; place-items: center; background: none; color: var(--soft); border-radius: 5px; }
.ds-seg button svg { width: 14px; height: 14px; }
.ds-seg button:hover { color: var(--text); }
.ds-seg button.on { background: var(--panel); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .2), 0 0 0 .5px var(--line2); }
.ds-seg.txt { flex: 1; } .ds-seg.txt button { flex: 1; font-size: 11px; white-space: nowrap; }
.ds-paint { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ds-paint.off > :not(.ds-icon) { opacity: .45; }
.ds-paint .ds-num { width: 60px; flex: none; }
.ds-paint.stop .ds-num { width: 52px; }
.ds-paint.stop .ds-num-l { min-width: 6px; padding-left: 4px; }
.ds-swatch { position: relative; width: 22px; height: 22px; flex: none; border-radius: 5px; box-shadow: inset 0 0 0 1px rgba(127, 127, 127, .3); background-size: cover; background-position: center; overflow: hidden; }
.ds-swatch.round { width: 16px; height: 16px; border-radius: 50%; }
.ds-swatch input { position: absolute; inset: -8px; width: 40px; height: 40px; opacity: 0; cursor: pointer; }
.ds-hex { flex: 1; min-width: 0; height: 28px; background: var(--field); border: 1px solid transparent; border-radius: 6px; padding: 0 7px; color: var(--text); font: inherit; text-transform: uppercase; outline: none; font-variant-numeric: tabular-nums; }
.ds-hex:hover { border-color: var(--line2); }
.ds-hex:focus { border-color: var(--accent-line); }
.ds-grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-muted { color: var(--muted); }
p.ds-muted { margin: 0; padding: 0 2px; line-height: 1.55; }
.ds-stops { display: grid; gap: 6px; padding-left: 8px; border-left: 1px solid var(--line2); margin-left: 10px; }
.ds-link { background: none; padding: 2px 4px; color: var(--accent-text); justify-self: start; border-radius: 4px; }
.ds-link:hover { background: none; text-decoration: underline; color: var(--accent-text); }
.ds-link.quiet { color: var(--muted); margin-left: auto; }
.ds-link.danger { color: #f0524f; }
.ds-check { display: flex; align-items: center; gap: 8px; padding: 2px; color: var(--text); cursor: pointer; }
.ds-check input { accent-color: var(--accent); margin: 0; }
.ds-effect { display: grid; gap: 6px; }
.ds-effect.off > :not(:first-child) { opacity: .45; }
.ds-effect .ds-select { flex: 1; }
.ds-btnrow { display: flex; gap: 6px; padding: 0 12px 6px; }
.ds-sec .ds-btnrow, .ds-modal .ds-btnrow, .ds-pop .ds-btnrow { padding: 0; }
.ds-btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 28px; padding: 0 10px; background: var(--raise); color: var(--text); border: 0; box-shadow: inset 0 0 0 1px var(--line2); border-radius: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-btn svg { width: 14px; height: 14px; flex: none; }
.ds-btn:hover { background: var(--fill); }
.ds-btn.wide { width: 100%; }
.ds-btn.accent { background: var(--accent); box-shadow: none; color: var(--accent-ink); }
.ds-btn.accent:hover { background: var(--accent-hover); }
.ds-btn:disabled { opacity: .45; }
.ds-hints { display: grid; gap: 7px; padding: 0 2px; color: var(--soft); }
.ds-hints div { display: flex; gap: 8px; align-items: baseline; }
.ds-hints kbd, .ds-keys kbd { flex: none; min-width: 48px; font: 500 10px/1.7 var(--ui-font); color: var(--text); background: var(--field); padding: 0 5px; border-radius: 4px; text-align: center; box-shadow: inset 0 -1px 0 var(--line2); }
.ds-presets { display: grid; gap: 8px; }
.ds-presets h5, .ds-h5 { margin: 4px 2px 2px; font-size: 10px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.ds-preset { display: flex; justify-content: space-between; width: 100%; height: 28px; padding: 0 8px; align-items: center; background: none; color: var(--text); border-radius: 6px; }
.ds-preset small { color: var(--muted); font-variant-numeric: tabular-nums; }
.ds-preset:hover { background: var(--raise); }
.ds-note { display: flex; align-items: flex-start; gap: 8px; margin: 4px 12px 8px; padding: 8px 10px; border-radius: 8px; background: color-mix(in srgb, var(--ds-comp) 10%, transparent); color: var(--soft); line-height: 1.5; }
.ds-note svg { width: 14px; height: 14px; color: var(--ds-comp); margin-top: 1px; }
.ds-note > span:first-child { display: grid; flex: none; }
.ds-note .ds-link { margin-left: auto; flex: none; }
.ds-note.sm { margin: 0; padding: 6px 8px; background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent-text); font-weight: 500; }
.ds-inter { display: grid; gap: 6px; padding: 8px; border-radius: 8px; background: var(--raise); }

/* styles & variables */
.ds-srow { display: flex; align-items: center; gap: 8px; width: 100%; height: 30px; padding: 0 8px; background: none; color: var(--text); border-radius: 6px; text-align: left; }
.ds-srow:hover { background: var(--raise); }
.ds-srow small { color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }
.ds-chip { display: flex; align-items: center; gap: 4px; }
.ds-chip .ds-srow { flex: 1; min-width: 0; background: var(--field); }
.ds-chip .ds-srow:hover { box-shadow: inset 0 0 0 1px var(--line2); }
.ds-ag { width: 22px; height: 22px; flex: none; display: grid; place-items: center; border-radius: 5px; background: var(--fill); color: var(--text); font-size: 11px; }
.ds-fxsw { width: 18px; height: 18px; flex: none; border-radius: 5px; background: var(--panel); box-shadow: 0 2px 5px rgba(0, 0, 0, .35), inset 0 0 0 1px var(--line2); margin: 0 2px; }
.ds-vi { display: grid; place-items: center; width: 18px; height: 18px; flex: none; color: var(--ds-comp); }
.ds-vi svg { width: 14px; height: 14px; }
.ds-varchip { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 28px; padding: 0 8px; background: color-mix(in srgb, var(--ds-comp) 10%, var(--field)); color: var(--text); border-radius: 6px; text-align: left; }
.ds-varchip span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-varchip:hover { box-shadow: inset 0 0 0 1px var(--ds-comp); }
.ds-vars { width: min(820px, 94vw); }
.ds-vgrid { display: grid; align-items: center; margin: 4px 0 6px; border-top: 1px solid var(--line); }
.ds-vh, .ds-vc { display: flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 8px; border-bottom: 1px solid var(--line); min-width: 0; }
.ds-vh { color: var(--muted); font-weight: 600; min-height: 34px; }
.ds-vc .ds-hex { height: 26px; }
.ds-vin { min-width: 0; flex: 1; height: 26px; background: none; border: 1px solid transparent; border-radius: 5px; padding: 0 6px; color: var(--text); font: inherit; outline: none; }
.ds-vin:hover { border-color: var(--line2); }
.ds-vin:focus { border-color: var(--accent-line); background: var(--field); }
.ds-vin.head { font-weight: 600; color: var(--soft); }
.ds-vin.num { font-variant-numeric: tabular-nums; background: var(--field); }

/* menus, panels, modal */
.ds-pop { position: fixed; z-index: 90; min-width: 220px; padding: 6px; display: grid; background: var(--menu); border-radius: 12px; box-shadow: var(--pop-shadow); font: 12px/1.35 var(--ui-font); color: var(--text); animation: ds-in .12s ease-out; }
@keyframes ds-in { from { opacity: 0; transform: translateY(-3px) scale(.985); } }
.ds-pop > button { display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 6px; height: 28px; padding: 0 8px; background: none; color: var(--text); text-align: left; border-radius: 6px; }
.ds-pop > button i { display: grid; place-items: center; font-style: normal; }
.ds-pop > button i svg { width: 14px; height: 14px; }
.ds-pop > button small { color: var(--muted); font-size: 11px; padding-left: 12px; font-variant-numeric: tabular-nums; }
.ds-pop > button.on i::before { content: "✓"; }
.ds-pop > button.on i:has(svg)::before { content: none; }
.ds-pop > button.on { font-weight: 600; }
.ds-pop > button:hover:not(:disabled) { background: var(--accent); color: var(--accent-ink); }
.ds-pop > button:hover:not(:disabled) small { color: rgba(255, 255, 255, .8); }
.ds-pop > button.has-sub small::after { content: "›"; font-size: 13px; }
.ds-pop > button:disabled { opacity: .35; }
.ds-pop hr { border: 0; border-top: 1px solid var(--line2); margin: 5px 4px; }
.ds-pop.ds-panel { width: 288px; padding: 10px; gap: 6px; font-size: 11px; max-height: min(560px, 80vh); overflow: auto; scrollbar-width: thin; }
.ds-pop.ds-panel > button.ds-srow { display: flex; height: 30px; padding: 0 8px; }
.ds-pop.ds-panel > button.ds-srow:hover { background: var(--raise); color: var(--text); }
.ds-pop.ds-panel > button.ds-srow:hover small { color: var(--muted); }
.ds-pop.ds-panel > .ds-link { display: block; height: auto; padding: 2px 4px; }
.ds-pop.ds-panel > .ds-link:hover { background: none; color: var(--accent-text); }
.ds-pop-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 26px; padding: 0 0 0 4px; }
.ds-pop-head b { font-weight: 600; font-size: 11.5px; }
.ds-pop-head h3 { margin: 0; font-size: 14px; }
.ds-pop .ds-pop-head ~ .ds-pop-head { margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--line); }
.ds-pop-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--line); }
.ds-modal { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; background: rgba(0, 0, 0, .38); backdrop-filter: blur(2px); animation: ds-fade .14s ease-out; }
@keyframes ds-fade { from { opacity: 0; } }
.ds-modal-card { width: min(760px, 92vw); max-height: 84vh; overflow: auto; padding: 18px 22px 20px; background: var(--panel); color: var(--text); border-radius: 16px; box-shadow: var(--pop-shadow); font: 12px/1.45 var(--ui-font); display: grid; gap: 10px; animation: ds-in .16s ease-out; }
.ds-modal-card h3 { margin: 0; font-size: 14px; font-weight: 600; }
.ds-modal-card.small { width: min(380px, 92vw); }
.ds-modal-card.small p { margin: -2px 0 6px; line-height: 1.55; }
.ds-keys { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 28px; }
.ds-keys h4 { margin: 0 0 6px; font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.ds-keys div { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.ds-keys kbd { min-width: 0; }

/* quick actions (⌘K) */
.ds-cmdk { position: fixed; inset: 0; z-index: 96; display: grid; justify-items: center; align-items: start; padding-top: 14vh; background: rgba(0, 0, 0, .28); animation: ds-fade .12s ease-out; }
.ds-cmdk-card { width: min(560px, 92vw); background: var(--menu); border-radius: 14px; box-shadow: var(--pop-shadow); overflow: hidden; font: 12.5px/1.4 var(--ui-font); color: var(--text); animation: ds-in .14s ease-out; }
.ds-cmdk-in { display: flex; align-items: center; gap: 10px; padding: 0 16px; height: 50px; border-bottom: 1px solid var(--line); }
.ds-cmdk-in i { display: grid; color: var(--muted); } .ds-cmdk-in svg { width: 16px; height: 16px; }
.ds-cmdk-in input { flex: 1; background: none; border: 0; outline: none; color: var(--text); font: 14px var(--ui-font); }
.ds-cmdk-list { max-height: 360px; overflow: auto; padding: 6px; scrollbar-width: thin; }
.ds-cmdk-list p { padding: 10px; }
.ds-cmdk-row { display: flex; align-items: center; gap: 10px; width: 100%; height: 34px; padding: 0 10px; background: none; color: var(--text); border-radius: 8px; text-align: left; }
.ds-cmdk-row span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-cmdk-row small { color: var(--muted); font-size: 11px; }
.ds-cmdk-row kbd { font: 500 10.5px/1.7 var(--ui-font); padding: 0 6px; border-radius: 4px; background: var(--field); color: var(--soft); }
.ds-cmdk-row.on { background: var(--accent); color: var(--accent-ink); }
.ds-cmdk-row.on small { color: rgba(255, 255, 255, .75); } .ds-cmdk-row.on kbd { background: rgba(255, 255, 255, .2); color: #fff; }

/* comments */
.ds-pins { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.ds-pin { position: absolute; width: 30px; height: 30px; padding: 2px; transform: translate(0, -100%); border-radius: 50% 50% 50% 4px; background: var(--panel); box-shadow: 0 4px 14px rgba(0, 0, 0, .35), 0 0 0 1px var(--line2); pointer-events: auto; transition: transform .12s; }
.ds-pin:hover { transform: translate(0, -100%) scale(1.08); background: var(--panel); }
.ds-pin.on { background: var(--accent); }
.ds-pin.draft { pointer-events: none; background: var(--accent); }
.ds-pin i { position: absolute; top: -6px; right: -6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--text); color: var(--ink); font: 600 10px/16px var(--ui-font); font-style: normal; }
.ds-pin-face, .ds-face { width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center; font: 600 10px/1 var(--ui-font); color: #fff; }
.ds-face { width: 20px; height: 20px; flex: none; font-size: 9px; }
.ds-thread { position: absolute; width: 290px; background: var(--menu); border-radius: 12px; box-shadow: var(--pop-shadow); pointer-events: auto; font: 12px/1.45 var(--ui-font); color: var(--text); animation: ds-in .12s ease-out; }
.ds-thread-head { display: flex; align-items: center; gap: 2px; padding: 8px 8px 8px 12px; border-bottom: 1px solid var(--line); }
.ds-thread-list { max-height: 280px; overflow: auto; }
.ds-cmt { padding: 10px 12px 0; }
.ds-cmt p { margin: 6px 0 0 28px; white-space: pre-wrap; word-break: break-word; }
.ds-cmt-meta { display: flex; align-items: center; gap: 8px; }
.ds-cmt-meta small { color: var(--muted); }
.ds-compose { display: flex; gap: 6px; align-items: flex-end; padding: 10px; }
.ds-compose textarea { flex: 1; resize: none; min-height: 30px; max-height: 120px; background: var(--field); border: 1px solid transparent; border-radius: 7px; padding: 6px 8px; outline: none; color: var(--text); font: inherit; }
.ds-compose textarea:focus { border-color: var(--accent-line); }
.ds-compose .ds-btn { flex: none; }
.ds-cmt-row { display: flex; gap: 10px; align-items: flex-start; width: 100%; padding: 10px 8px; background: none; color: var(--text); border-radius: 8px; text-align: left; }
.ds-cmt-row:hover, .ds-cmt-row.on { background: var(--raise); }
.ds-cmt-row > span:last-child { min-width: 0; flex: 1; }
.ds-cmt-row small { color: var(--muted); }
.ds-cmt-row p { margin: 3px 0 0; color: var(--soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ds-cmt-row.done { opacity: .55; }

/* prototype player */
.ds-present { position: fixed; inset: 0; z-index: 99; outline: none; animation: ds-fade .2s ease-out; }
.ds-present canvas { display: block; }
.ds-present.leaving { opacity: 0; transition: opacity .15s ease-in; }
.ds-present.idle { cursor: none; }
.ds-pv-top { position: absolute; top: 0; left: 0; right: 0; height: 48px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 14px; color: #f2f2f2; font: 12px var(--ui-font); pointer-events: none; transition: opacity .35s ease; }
.ds-pv-top > * { pointer-events: auto; }
.ds-present.idle .ds-pv-top, .ds-present.idle .ds-pv-hint { opacity: 0; }
.ds-present.idle .ds-pv-top > * { pointer-events: none; }
.ds-pv-btn { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px 0 9px; color: #f2f2f2; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .08); border-radius: 999px; font: 500 12px var(--ui-font); backdrop-filter: blur(14px); transition: background .15s; }
.ds-pv-btn:hover { background: rgba(255, 255, 255, .16); }
.ds-pv-btn:disabled { opacity: .35; pointer-events: none; }
.ds-pv-back { justify-self: start; }
.ds-pv-btn kbd, .ds-pv-hint kbd { font: 500 9.5px/1 "Geist Mono", "DM Mono", ui-monospace, monospace; text-transform: uppercase; letter-spacing: .04em; padding: 3px 5px; border-radius: 4px; background: rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .7); }
.ds-pv-icon { width: 30px; padding: 0; justify-content: center; }
.ds-pv-title { display: flex; align-items: baseline; gap: 10px; font-weight: 500; letter-spacing: -.005em; }
.ds-pv-title small { font: 500 10px "Geist Mono", "DM Mono", ui-monospace, monospace; text-transform: uppercase; letter-spacing: .06em; color: rgba(255, 255, 255, .5); }
.ds-pv-tools { justify-self: end; display: flex; gap: 6px; }
.ds-pv-hint { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; gap: 18px; padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, .07); color: rgba(255, 255, 255, .6); font: 500 10px "Geist Mono", "DM Mono", ui-monospace, monospace; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; backdrop-filter: blur(14px); transition: opacity .5s ease; pointer-events: none; }
.ds-pv-hint span { display: inline-flex; align-items: center; gap: 5px; }
.ds-pv-hint.gone { opacity: 0; }

@media (width < 1100px) { :root { --ds-lw: 220px; --ds-rw: 256px; } }

/* ── animations on the canvas ── */
.ds-secondary { height: 28px; background: var(--raise); color: var(--text); font-weight: 600; padding: 0 12px; border-radius: 7px; margin-left: 2px; }
.ds-secondary:hover { background: var(--fill); }
.ds-secondary.live { box-shadow: inset 0 0 0 1px var(--accent-line); color: var(--accent-text); }
.ds-tool-anim.on { background: var(--accent); color: var(--accent-ink); }
.ds-timeline { position: absolute; left: calc(50% + (var(--ds-lw) + var(--ds-lo) - var(--ds-rw)) / 2); bottom: 64px; transform: translateX(-50%); z-index: 5; width: min(920px, calc(100% - var(--ds-lw) - var(--ds-lo) - var(--ds-rw) - 40px)); --tl-l: 148px; --tl-r: 120px; background: var(--panel); border-radius: 14px; box-shadow: var(--card-shadow, 0 8px 28px rgba(0, 0, 0, .2)), inset 0 0 0 1px var(--line); overflow: hidden; user-select: none; -webkit-user-select: none; }
.ds.ui-hidden .ds-timeline { left: 50%; width: min(920px, calc(100% - 40px)); }
.ds-tl-head { display: grid; grid-template-columns: var(--tl-l) 1fr var(--tl-r); align-items: center; height: 36px; }
.ds-tl-ctl { display: flex; align-items: center; gap: 2px; padding-left: 6px; }
.ds-tl-ctl .ds-icon { color: var(--text); width: 26px; height: 26px; }
.ds-tl-time { min-width: 52px; padding-left: 4px; color: var(--soft); font: 500 11px/1 'DM Mono', ui-monospace, monospace; font-variant-numeric: tabular-nums; text-transform: uppercase; }
.ds-tl-ruler { position: relative; height: 100%; cursor: ew-resize; touch-action: none; }
.ds-tl-ruler i { position: absolute; bottom: 9px; width: 1px; height: 4px; background: var(--line2); transform: translateX(-.5px); }
.ds-tl-ruler i.major { height: 7px; background: var(--muted); }
.ds-tl-ruler i.major::after { content: attr(data-t); position: absolute; bottom: 10px; left: 0; transform: translateX(-50%); color: var(--muted); font: 500 9.5px/1 'DM Mono', ui-monospace, monospace; text-transform: uppercase; }
.ds-tl-ruler i.major:first-child::after { transform: none; }
.ds-tl-ruler i.major:last-of-type::after { transform: translateX(-100%); }
.ds-tl-knob { position: absolute; top: 6px; bottom: 4px; left: calc(var(--ph, 0) * 100%); width: 2px; margin-left: -1px; border-radius: 1px; background: var(--text); pointer-events: none; }
.ds-tl-knob::before { content: ''; position: absolute; top: -1px; left: -4px; width: 10px; height: 10px; border-radius: 3px; background: var(--text); }
.ds-tl-tools { display: flex; align-items: center; justify-content: flex-end; gap: 4px; padding-right: 6px; }
.ds-tl-dur { height: 22px; padding: 0 7px; border-radius: 6px; background: none; color: var(--soft); font: 500 11px/1 'DM Mono', ui-monospace, monospace; text-transform: uppercase; }
.ds-tl-dur:hover:not(:disabled) { background: var(--raise); color: var(--text); }
.ds-tl-dur:disabled { opacity: .6; cursor: default; }
.ds-tl-durin { width: 46px; height: 22px; padding: 0 6px; border-radius: 6px; border: 0; background: var(--raise); color: var(--text); font: 500 11px/1 'DM Mono', ui-monospace, monospace; outline: 1px solid var(--accent-line); }
.ds-tl-rec { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px 0 7px; border-radius: 6px; background: none; color: var(--soft); font-size: 11px; }
.ds-tl-rec i { width: 7px; height: 7px; border-radius: 50%; box-shadow: inset 0 0 0 1.3px currentColor; }
.ds-tl-rec:hover { background: var(--raise); color: var(--text); }
.ds-tl-rec.on { color: #ff5a4e; background: rgba(255, 90, 78, .12); }
.ds-tl-rec.on i { background: #ff5a4e; box-shadow: none; animation: ds-rec 1.2s ease-in-out infinite; }
@keyframes ds-rec { 50% { opacity: .35; } }
.ds-tl-fold { transform: rotate(90deg); color: var(--muted); }
.ds-tl-fold.folded { transform: rotate(-90deg); }
.ds-tl-body { position: relative; max-height: 190px; overflow-y: auto; border-top: 1px solid var(--line); padding: 4px 0; }
.ds-timeline.folded .ds-tl-body { display: none; }
.ds-tl-row { display: grid; grid-template-columns: var(--tl-l) 1fr var(--tl-r); align-items: center; height: 26px; }
.ds-tl-row.sub { height: 22px; }
.ds-tl-label { display: flex; align-items: center; gap: 6px; min-width: 0; height: 22px; margin: 0 6px; padding: 0 6px; border-radius: 6px; background: none; color: var(--soft); font-size: 11.5px; text-align: left; }
.ds-tl-label i { display: grid; place-items: center; width: 14px; flex: none; color: var(--muted); }
.ds-tl-label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-tl-label:hover { background: var(--raise); color: var(--text); }
.ds-tl-label.on { color: var(--text); }
.ds-tl-label.sub { padding-left: 26px; color: var(--muted); font-size: 11px; background: none; }
.ds-tl-lane { position: relative; height: 100%; }
.ds-tl-lane::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--line); }
.ds-tl-row.on .ds-tl-lane:not(.sub)::after { content: ''; position: absolute; inset: 3px -4px; border-radius: 6px; background: var(--raise); z-index: -1; }
.ds-tl-lane { z-index: 0; }
.ds-tl-act { display: flex; justify-content: flex-end; align-items: center; padding-right: 10px; }
.ds-tl-bar { position: absolute; top: 5px; bottom: 5px; min-width: 6px; border-radius: 5px; background: color-mix(in srgb, var(--accent) 22%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-line) 55%, transparent); cursor: grab; display: flex; align-items: center; overflow: hidden; }
.ds-tl-bar em { padding: 0 6px; font-style: normal; font-size: 10px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.ds-tl-bar.out { justify-content: flex-end; }
.ds-tl-grip { position: absolute; top: 0; bottom: 0; width: 7px; cursor: ew-resize; }
.ds-tl-grip.in { right: 0; } .ds-tl-grip.out { left: 0; }
.ds-tl-grip::after { content: ''; position: absolute; top: 4px; bottom: 4px; left: 3px; width: 1.5px; border-radius: 1px; background: color-mix(in srgb, var(--accent) 80%, transparent); }
.ds-tl-loop { position: absolute; left: 0; right: 0; top: 50%; height: 8px; transform: translateY(-50%); opacity: .55; background: radial-gradient(circle at 4px 50%, transparent 2.6px, var(--muted) 2.7px, var(--muted) 3.5px, transparent 3.6px) 0 0 / 8px 8px repeat-x; -webkit-mask: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ds-tl-clip { position: absolute; top: 5px; bottom: 5px; border-radius: 5px; background: var(--raise); box-shadow: inset 0 0 0 1px var(--line2); color: var(--soft); font-size: 10px; line-height: 16px; padding: 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-tl-key { position: absolute; top: 50%; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; transform: rotate(45deg); border-radius: 2px; background: var(--text); box-shadow: 0 0 0 2px var(--panel); cursor: grab; z-index: 2; }
.ds-tl-key.sum { width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; background: var(--muted); cursor: default; }
.ds-tl-key.on, .ds-tl-key:hover { background: var(--accent); }
.ds-tl-ph { position: absolute; top: 0; bottom: 0; left: calc(var(--tl-l) + (100% - var(--tl-l) - var(--tl-r)) * var(--ph, 0)); width: 1px; background: var(--text); opacity: .7; pointer-events: none; z-index: 3; }
.ds-tl-empty { padding: 10px 14px; color: var(--muted); font-size: 11.5px; }
.ds-keybtn { width: 18px; height: 18px; padding: 0; border-radius: 4px; background: none; display: grid; place-items: center; }
.ds-keybtn::before { content: ''; width: 8px; height: 8px; transform: rotate(45deg); border-radius: 1.5px; box-shadow: inset 0 0 0 1.2px var(--muted); }
.ds-keybtn.some::before { box-shadow: inset 0 0 0 1.4px var(--text); }
.ds-keybtn.on::before { background: var(--accent); box-shadow: none; }
.ds-keybtn:hover { background: var(--raise); }
.ds-keybtn:hover::before { box-shadow: inset 0 0 0 1.4px var(--text); }
.ds-keybtn.on:hover::before { box-shadow: none; }
.ds-anim-lib { padding-bottom: 6px; }
.ds-anim-lib .ds-sec-head .ds-anim-cat { width: auto; max-width: 160px; height: 24px; }
.ds-anim-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 2px 8px 8px; }
.ds-insp .ds-anim-grid { padding: 2px 0 6px; }
.ds-anim-tile { display: grid; gap: 5px; padding: 5px; background: none; color: var(--soft); text-align: left; border-radius: 9px; }
.ds-anim-tile span { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-anim-tile:hover { background: var(--raise); color: var(--text); }
.ds-anim-thumb { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 6px; background: #0c0c0d; box-shadow: inset 0 0 0 1px var(--line); }
.ds-anim-card { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 9px; background: var(--raise); margin-bottom: 8px; }
.ds-anim-card i { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent-text); flex: none; }
.ds-anim-card i svg { width: 16px; height: 16px; }
.ds-anim-card strong { display: block; font-size: 12px; color: var(--text); }
.ds-anim-card small { color: var(--muted); }
.ds-swatch.anim { display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent-text); box-shadow: none; }
.ds-swatch.anim svg { width: 14px; height: 14px; }
.ds-menu-btn svg { width: 16px; height: 16px; }
.ds-seg.full { display: flex; width: 100%; margin-bottom: 4px; }
.ds-seg.full button { flex: 1; }
.ds-seg button.on { background: var(--panel); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.ds-shader-cols { gap: 6px; }
.ds-effect > * + * { margin-top: 4px; }

/* ── Surface-inspired: rail, quiet controls, neutral primary buttons ── */
.ds-rail { position: absolute; left: var(--ds-gap); top: var(--ds-gap); bottom: var(--ds-gap); width: calc(var(--ds-rail) - var(--ds-gap)); z-index: 6; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 0; background: var(--panel); border-radius: 12px; box-shadow: var(--card-shadow); }
.ds-rail-btn { position: relative; width: 40px; display: grid; justify-items: center; gap: 4px; padding: 0; background: none; color: var(--muted); border-radius: 9px; }
.ds-rail-btn i { width: 36px; height: 34px; display: grid; place-items: center; border-radius: 9px; transition: background-color .15s, color .15s; }
.ds-rail-btn i svg { width: 17px; height: 17px; }
.ds-rail-btn span { display: none; font-size: 9.5px; font-weight: 600; letter-spacing: .01em; color: var(--text); }
.ds-rail-btn:hover { background: none; color: var(--text); }
.ds-rail-btn:hover i { background: var(--raise); }
.ds-rail-btn.on { color: var(--text); }
.ds-rail-btn.on i { background: var(--raise); box-shadow: inset 0 0 0 1px var(--line2); }
.ds-rail-btn.on span { display: block; margin-bottom: 4px; }
.ds-new { position: absolute; top: -4px; right: -10px; padding: 1px 5px; border-radius: 6px; background: #c6ff4d; color: #141a05; font: 700 8.5px/1.4 var(--ui-font); letter-spacing: .02em; pointer-events: none; }
.ds-dot { display: inline-block; width: 6px; height: 6px; margin-left: 5px; vertical-align: 1px; border-radius: 50%; background: #c6ff4d; }
.ds-panel-title { display: flex; align-items: center; min-height: 32px; padding: 2px 6px 8px; font: 600 13px/1.3 var(--ui-font); color: var(--text); }
.ds-panel-title .ds-seg { flex: 1; }
.ds-small { font-size: 10.5px; padding: 0 2px; }
.ds-pad { padding: 0 8px 6px; }

/* neutral primary (white in dark, black in light); blue stays for selection on the canvas */
.ds-primary, .ds-btn.accent { background: var(--text); color: var(--panel); }
.ds-primary:hover, .ds-btn.accent:hover { background: var(--primary-hover); color: var(--panel); }
.ds-tool.on, .ds-tool-anim.on { background: var(--text); color: var(--panel); }
.ds-cta { width: 100%; height: 38px; margin-top: 6px; border-radius: 9px; background: var(--text); color: var(--panel); font-weight: 600; font-size: 12px; }
.ds-cta:hover { background: var(--primary-hover); color: var(--panel); }
.ds-cta.ghost { background: var(--raise); color: var(--text); box-shadow: inset 0 0 0 1px var(--line2); }
.ds-cta.ghost:hover { background: var(--fill); }

/* number fields that read as sliders */
.ds-num.slide { background: linear-gradient(90deg, color-mix(in srgb, var(--text) 9%, var(--field)) var(--p, 0%), var(--field) var(--p, 0%)); }
.ds-num.slide::after { content: ""; position: absolute; left: var(--p, 0%); top: 7px; bottom: 7px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--soft); opacity: .55; pointer-events: none; }

/* brand */
.ds-bsec { border-radius: 9px; margin: 0 2px 6px; background: var(--raise); overflow: hidden; }
.ds-bsec-head { width: 100%; display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px; background: none; color: var(--text); font-weight: 600; text-align: left; border-radius: 0; }
.ds-bsec-head:hover { background: var(--fill); }
.ds-bsec-head span { flex: 1; }
.ds-bsec-head i { width: 12px; height: 12px; display: grid; place-items: center; color: var(--muted); transform: rotate(0deg); transition: transform .15s; }
.ds-bsec-head i svg { width: 10px; height: 10px; }
.ds-bsec-head.open i { transform: rotate(90deg); }
.ds-bsec-body { display: grid; gap: 8px; padding: 2px 10px 12px; }
.ds-input { height: 28px; padding: 0 8px; border: 1px solid transparent; border-radius: 6px; background: var(--panel); color: var(--text); font: inherit; outline: none; }
.ds-input:focus { border-color: var(--accent-line); }
.ds-swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.ds-sw { position: relative; width: 26px; height: 26px; padding: 0; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(127, 127, 127, .35); }
.ds-sw.sm { width: 18px; height: 18px; }
.ds-sw.on { box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--text); }
.ds-sw:hover { transform: scale(1.08); }
.ds-sw.add { display: grid; place-items: center; background: none; color: var(--soft); box-shadow: inset 0 0 0 1px var(--line2); cursor: pointer; }
.ds-sw.add svg { width: 12px; height: 12px; }
.ds-sw.add input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.ds-font-row { display: grid; grid-template-columns: 52px 1fr 64px; align-items: center; gap: 6px; }
.ds-font-row .ds-font { height: 28px; min-width: 0; }
.ds-ramp { display: grid; grid-template-columns: 1fr 76px; align-items: center; gap: 6px; }
.ds-ramp-btn { display: flex; align-items: center; min-height: 34px; padding: 2px 6px; background: none; color: var(--text); text-align: left; border-radius: 7px; overflow: hidden; }
.ds-ramp-btn:hover { background: var(--fill); }
.ds-ramp-prev { line-height: 1.1; white-space: nowrap; letter-spacing: -.01em; }
.ds-logo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ds-logo { aspect-ratio: 3 / 2; padding: 0; border-radius: 7px; background: var(--panel) center / 70% no-repeat; box-shadow: inset 0 0 0 1px var(--line); }
.ds-logo:hover { box-shadow: inset 0 0 0 1px var(--line2); }
.ds-layout-thumb { width: 100%; aspect-ratio: 4 / 5; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--line); }

/* animate: controls and templates */
.ds-sub { padding: 2px 0 8px; }
.ds-ctl { display: grid; gap: 4px; margin-bottom: 8px; }
.ds-ctl > .ds-muted { font-size: 10.5px; }
.ds-variants { display: grid; gap: 8px; padding-bottom: 8px; }
.ds-anim-tile.big { grid-template-columns: 1fr; padding: 6px; background: var(--raise); }
.ds-anim-tile.big .ds-anim-thumb { aspect-ratio: 16 / 10; }
.ds-anim-tile.on { box-shadow: inset 0 0 0 1.5px var(--text); }

/* export panel */
.ds-x-target { display: flex; align-items: center; gap: 10px; padding: 10px; margin-bottom: 4px; border-radius: 9px; background: var(--raise); }
.ds-x-target i { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px; background: var(--fill); color: var(--text); flex: none; }
.ds-x-target i svg { width: 15px; height: 15px; }
.ds-x-target strong { display: block; font-size: 12px; }
.ds-x-target small { color: var(--muted); }
.ds-xrow { display: grid; gap: 5px; margin-bottom: 9px; }
.ds-xrow > .ds-muted { font-size: 10.5px; }
.ds-xgrid { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; padding: 3px; border-radius: 8px; background: var(--field); }
.ds-xgrid.four { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); }
.ds-xgrid button { height: 26px; padding: 0 4px; background: none; color: var(--soft); border-radius: 6px; font-weight: 500; font-variant-numeric: tabular-nums; }
.ds-xgrid button:hover { color: var(--text); background: none; }
.ds-xgrid button.on { background: var(--panel); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .18), 0 0 0 .5px var(--line2); }
.ds-xsum { margin-top: 4px; padding: 9px 10px; border-radius: 8px; background: var(--field); color: var(--soft); font-variant-numeric: tabular-nums; }

/* canvas bar */
.ds-canvasbar { position: absolute; top: 34px; left: calc(50% + (var(--ds-lw) + var(--ds-lo) - var(--ds-rw)) / 2); transform: translateX(-50%); z-index: 5; display: flex; align-items: center; gap: 4px; padding: 5px; background: var(--panel); border-radius: 12px; box-shadow: var(--card-shadow); }
.ds.ui-hidden .ds-canvasbar { left: 50%; }
.ds-cb { width: 30px; height: 30px; padding: 0; display: grid; place-items: center; background: var(--raise); color: var(--text); border-radius: 8px; }
.ds-cb svg { width: 15px; height: 15px; }
.ds-cb:hover { background: var(--fill); }
.ds-cb.on { background: var(--text); color: var(--panel); }
.ds-cb.text { width: auto; min-width: 44px; padding: 0 9px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ds-cb.dim { color: var(--muted); }
.ds-grid-pop { width: 240px; display: grid; gap: 10px; padding: 12px; }

/* hints */
.ds-hint { position: fixed; z-index: 90; max-width: 260px; display: flex; align-items: flex-start; gap: 9px; padding: 9px 12px 9px 9px; border-radius: 11px; background: var(--menu); color: var(--text); box-shadow: var(--pop-shadow); font: 500 11.5px/1.45 var(--ui-font); cursor: pointer; animation: ds-hint-in .25s ease-out; }
.ds-hint i { width: 22px; height: 22px; flex: none; display: grid; place-items: center; border-radius: 6px; background: var(--text); color: var(--panel); }
.ds-hint i svg { width: 13px; height: 13px; }
.ds-hint.out { opacity: 0; transition: opacity .3s; }
@keyframes ds-hint-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.ds-cs-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0 5px; }
.ds-cs-row strong { display: block; font-weight: 600; color: var(--text); }
.ds-cs-row small { color: var(--muted); }
.ds-switch { position: relative; width: 30px; height: 18px; padding: 0; border-radius: 9px; background: var(--fill); flex: none; }
.ds-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--soft); transition: transform .15s, background-color .15s; }
.ds-switch.on { background: var(--text); }
.ds-switch.on::after { transform: translateX(12px); background: var(--panel); }

/* Figma-style effect rows */
.ds-fx-ic { width: 22px; height: 22px; flex: none; display: grid; place-items: center; color: var(--soft); }
.ds-fx-ic svg { width: 15px; height: 15px; }
.ds-effect .ds-paint .ds-select { flex: 1; }
.ds-slrow { display: grid; grid-template-columns: 70px 1fr 58px; align-items: center; gap: 8px; min-height: 30px; }
.ds-slrow > .ds-muted { font-size: 11px; }
.ds-slrow .ds-num { height: 26px; }
input[type=range].ds-range { -webkit-appearance: none; appearance: none; width: 100%; height: 26px; margin: 0; padding: 0 2px; background: none; cursor: pointer; }
input[type=range].ds-range::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: var(--fill); }
input[type=range].ds-range::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 .5px rgba(0, 0, 0, .25), 0 1px 3px rgba(0, 0, 0, .3); }
input[type=range].ds-range::-moz-range-track { height: 4px; border-radius: 2px; background: var(--fill); }
input[type=range].ds-range::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
input[type=range].ds-range:focus { outline: none; }
.ds-light { display: grid; grid-template-columns: 70px 64px 1fr; align-items: center; gap: 8px; padding: 4px 0 8px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.ds-light-n { display: grid; gap: 4px; }
.ds-rotpad { position: relative; flex: none; width: 64px; height: 56px; border-radius: 10px; background: var(--field); cursor: grab; box-shadow: inset 0 0 0 1px var(--line); perspective: 120px; display: grid; place-items: center; touch-action: none; }
.ds-rotpad:active { cursor: grabbing; }
.ds-rotpad i { width: 24px; height: 24px; border-radius: 4px; border: 1.5px solid var(--text); background: linear-gradient(135deg, rgba(127,127,127,.18), rgba(127,127,127,.04)); transform-style: preserve-3d; position: relative; }
.ds-rotpad i::after { content: ''; position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; border-radius: 50%; background: var(--text); }
.ds-rot3d { align-items: center; gap: 10px; }
.ds-rot3d > .ds-grow { min-width: 0; }
.ds-rot3d p { margin: 0 0 4px; white-space: normal; overflow-wrap: anywhere; line-height: 1.35; }
.ds-dial { position: relative; width: 64px; height: 56px; border-radius: 10px; background: var(--field); cursor: grab; box-shadow: inset 0 0 0 1px var(--line); }
.ds-dial::before { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 3px; box-shadow: inset 0 0 0 1px var(--soft); }
.ds-dial i { position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: #ffd34d; box-shadow: 0 0 10px 2px rgba(255, 211, 77, .55); }
.ds-effect { display: grid; gap: 6px; padding: 6px 0 10px; }
.ds-effect + .ds-effect { border-top: 1px solid var(--line); }
.ds-adjust { display: grid; gap: 2px; padding: 2px 0 8px 4px; }
.ds-adjust .ds-sec-head.sub { margin-top: 0; padding-left: 0; }

/* typography: font button, picker, type settings */
.ds-fontbtn { width: 100%; height: 32px; display: flex; align-items: center; gap: 8px; padding: 0 8px 0 10px; margin-bottom: 4px; background: var(--field); color: var(--text); border-radius: 7px; text-align: left; }
.ds-fontbtn:hover { background: var(--fill); }
.ds-fontbtn span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.ds-fontbtn small { color: var(--muted); font-size: 10px; }
.ds-fontbtn i { width: 10px; display: grid; place-items: center; color: var(--muted); }
.ds-fontbtn i svg { width: 8px; height: 8px; }
.ds-fontpick { width: 320px; height: min(520px, 70vh); display: flex; flex-direction: column; gap: 8px; padding: 10px; }
.ds-fontq { height: 32px; background: var(--field); }
.ds-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.ds-chips button { height: 24px; padding: 0 9px; border-radius: 12px; background: var(--field); color: var(--soft); font-weight: 500; }
.ds-chips button.on { background: var(--text); color: var(--panel); }
.ds-fontlist { flex: 1; min-height: 0; overflow: auto; display: grid; align-content: start; gap: 1px; margin: 0 -4px; padding: 0 4px; scrollbar-width: thin; }
.ds-fontrow { display: grid; gap: 1px; padding: 7px 8px; background: none; color: var(--text); text-align: left; border-radius: 7px; }
.ds-fontrow:hover { background: var(--raise); }
.ds-fontrow.on { background: var(--raise); box-shadow: inset 0 0 0 1px var(--line2); }
.ds-fontrow span { font-size: 16px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-fontrow small { color: var(--muted); font: 10px/1.3 var(--ui-font); }
.ds-more { padding: 8px; }
.ds-fontfoot { display: flex; justify-content: space-between; align-items: center; padding-top: 6px; border-top: 1px solid var(--line); }
.ds-typepop { width: 300px; display: grid; gap: 8px; padding: 12px; }
.ds-pop-title { font: 600 12px/1.4 var(--ui-font); color: var(--text); padding-bottom: 2px; }
.ds-typeset { margin-top: 4px; }
.ds-typeset svg { width: 14px; height: 14px; }
.ds-typepop .ds-xgrid button { padding: 0 3px; font-size: 10.5px; }

/* animation browser */
.ds-anim-head { display: grid; gap: 6px; padding: 0 6px 8px; }
.ds-anim-q { height: 32px; background: var(--field); }
.ds-sec-title { font-weight: 600; color: var(--text); padding: 2px 2px 0; }
.ds-anim-sec { padding: 10px 8px 4px; color: var(--muted); font-size: 10.5px; font-weight: 600; letter-spacing: .02em; }
.ds-anim-cats { display: grid; gap: 2px; padding: 0 4px; }
.ds-anim-cat { display: grid; grid-template-columns: 30px 1fr auto 12px; align-items: center; gap: 10px; height: 46px; padding: 0 8px 0 6px; background: none; color: var(--text); text-align: left; border-radius: 8px; }
.ds-anim-cat:hover { background: var(--raise); }
.ds-anim-cat small { color: var(--muted); font-variant-numeric: tabular-nums; }
.ds-anim-cat i { display: grid; place-items: center; color: var(--muted); }
.ds-anim-cat i svg { width: 10px; height: 10px; }
.ds-anim-mini { width: 30px; height: 40px; border-radius: 5px; background: #0c0c0d; box-shadow: inset 0 0 0 1px var(--line); object-fit: cover; }
.ds-anim-crumb { display: flex; align-items: center; gap: 6px; padding: 0 8px 8px; color: var(--muted); }
.ds-anim-crumb strong { color: var(--text); font-size: 12px; }
.ds-anim-back { width: 26px; height: 26px; padding: 0; display: grid; place-items: center; background: var(--raise); color: var(--text); border-radius: 7px; transform: scaleX(-1); }
.ds-anim-back svg { width: 11px; height: 11px; }
.ds-insp .ds-anim-head, .ds-insp .ds-anim-crumb { padding-left: 0; padding-right: 0; }
.ds-insp .ds-anim-cats { padding: 0; }
.ds-fontrow { display: grid; grid-template-columns: 1fr auto; align-items: center; border-radius: 7px; }
.ds-fontrow:hover, .ds-fontrow.open { background: var(--raise); }
.ds-fontrow.on { box-shadow: inset 0 0 0 1px var(--line2); background: var(--raise); }
.ds-fontmain { min-width: 0; padding: 7px 8px; background: none; color: var(--text); text-align: left; }
.ds-fontmain:hover { background: none; }
.ds-fontmain span, .ds-fontstyle span { display: block; font-size: 16px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-fontmore { display: flex; align-items: center; gap: 4px; height: 28px; padding: 0 8px; margin-right: 4px; background: none; color: var(--muted); border-radius: 6px; }
.ds-fontmore:hover { background: var(--fill); color: var(--text); }
.ds-fontmore.none { width: 12px; }
.ds-fontmore i { display: grid; place-items: center; transition: transform .15s; }
.ds-fontmore i svg { width: 9px; height: 9px; }
.ds-fontrow.open .ds-fontmore i { transform: rotate(90deg); }
.ds-fontstyles { grid-column: 1 / -1; display: grid; padding: 0 6px 6px 18px; }
.ds-fontstyle { padding: 5px 8px; background: none; color: var(--text); text-align: left; border-radius: 6px; }
.ds-fontstyle:hover { background: var(--fill); }
.ds-fontstyle span { font-size: 14px; }
.ds-fonthead { padding: 10px 8px 4px; color: var(--muted); font-size: 10.5px; font-weight: 600; letter-spacing: .02em; }

/* Figma-style typography */
.ds-labeled { display: grid; gap: 4px; }
.ds-field-l { color: var(--muted); font-size: 10.5px; padding-left: 1px; }
.ds-fontbtn { height: 32px; margin-bottom: 6px; background: var(--field); }
.ds-fontbtn span { font: 500 12px/1.3 var(--ui-font); }
.ds-combo { display: grid; grid-template-columns: 1fr 26px; gap: 1px; }
.ds-combo .ds-num { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.ds-combo-btn { height: 28px; padding: 0; display: grid; place-items: center; background: var(--field); color: var(--muted); border-radius: 0 6px 6px 0; }
.ds-combo-btn:hover { color: var(--text); background: var(--fill); }
.ds-combo-btn svg { width: 8px; height: 8px; }
.ds-align-row { display: flex; align-items: center; gap: 6px; }
.ds-align-row .ds-seg { flex: 1; }
.ds-align-row .ds-seg button { flex: 1; }
.ds-pop-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 0 4px; }
.ds-pop-head strong { font: 600 12.5px/1.3 var(--ui-font); color: var(--text); }
.ds-fontpick { width: 300px; height: min(560px, 72vh); gap: 10px; padding: 12px 12px 10px; }
.ds-fontsearch { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 8px 0 10px; border-radius: 8px; background: var(--field); box-shadow: inset 0 0 0 1px var(--line); }
.ds-fontsearch:focus-within { box-shadow: inset 0 0 0 1.5px var(--accent-line); }
.ds-fontsearch i { width: 15px; height: 15px; display: grid; place-items: center; color: var(--muted); }
.ds-fontsearch i svg { width: 15px; height: 15px; }
.ds-fontq { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: none; background: none; color: var(--text); font: 13px var(--ui-font); }
.ds-fontclear { width: 20px; height: 20px; padding: 0; display: grid; place-items: center; background: none; color: var(--muted); }
.ds-fontclear svg { width: 16px; height: 16px; }
.ds-fontbar { padding-bottom: 2px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.ds-fontfilter { width: 100%; height: 32px; }
.ds-fontlist { gap: 0; margin: 0 -12px; padding: 0; }
.ds-fontrow { display: grid; grid-template-columns: 34px 1fr; align-items: center; min-height: 40px; padding: 0 12px 0 0; background: none; color: var(--text); text-align: left; border-radius: 0; }
.ds-fontrow:hover { background: var(--raise); }
.ds-fontrow.on { background: var(--raise); box-shadow: none; }
.ds-fontrow span { font-size: 19px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-fontcheck { display: grid; place-items: center; color: var(--text); }
.ds-fontcheck svg { width: 14px; height: 14px; }
.ds-fontfoot { gap: 12px; }

/* Type settings (Figma's layout) */
.ds-typepop { width: 300px; padding: 0; gap: 0; overflow: hidden; }
.ds-ts-tabs { display: flex; align-items: center; gap: 2px; padding: 10px 10px 8px; border-bottom: 1px solid var(--line); }
.ds-ts-tabs button:not(.ds-icon) { height: 28px; padding: 0 12px; background: none; color: var(--muted); font-weight: 600; border-radius: 8px; }
.ds-ts-tabs button.on { background: var(--raise); color: var(--text); }
.ds-ts-body { display: grid; gap: 8px; padding: 14px 14px 16px; }
.ds-ts-preview { min-height: 96px; max-height: 140px; overflow: hidden; display: flex; align-items: center; padding: 14px 16px; border-radius: 10px; background: var(--field); color: var(--text); font-size: 22px; line-height: 1.2; white-space: pre-wrap; word-break: break-word; margin-bottom: 4px; }
.ds-ts-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 32px; }
.ds-ts-row > span { color: var(--soft); font-size: 11.5px; }
.ds-ts-row .ds-num { width: 96px; }
.ds-ts-row .ds-select { width: 120px; }
.ds-ts-row .ds-slrow { grid-template-columns: 1px 1fr 58px; flex: 1; }
.ds-ts-seg { display: flex; gap: 2px; padding: 2px; border-radius: 8px; background: var(--field); }
.ds-ts-seg button { min-width: 30px; height: 26px; padding: 0 6px; display: grid; place-items: center; background: none; color: var(--soft); border-radius: 6px; }
.ds-ts-seg button:hover { color: var(--text); background: none; }
.ds-ts-seg button.on { background: var(--panel); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .18), 0 0 0 .5px var(--line2); }
.ds-ts-seg svg { width: 15px; height: 15px; }
.ds-ts-txt { font: 600 11px/1 var(--ui-font); letter-spacing: .01em; }
.ds-ts-txt.sc { font-variant-caps: small-caps; }
.ds-ts-txt.trim { text-decoration: overline underline; text-decoration-thickness: 1px; }
.ds-ts-txt.trim.cap { text-decoration: underline; border-top: 1px solid currentColor; line-height: .72; padding-top: 1px; }
.ds-ts-pair { display: flex; align-items: center; gap: 6px; }
.ds-ts-pair .ds-num { width: 56px; }
.ds-ts-hr { border: 0; border-top: 1px solid var(--line); margin: 6px -14px; }
.ds-ts-note { font-size: 11.5px; line-height: 1.5; margin: 0; }

/* Figma-style image panel */
.ds-imgthumb { width: 22px; height: 22px; padding: 0; border-radius: 4px; cursor: pointer; }
.ds-imglabel { min-width: 0; padding: 0 4px; background: none; color: var(--text); text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-imglabel:hover { background: none; color: var(--text); }
.ds-imgpop { width: 300px; display: grid; gap: 12px; padding: 12px 14px 16px; }
.ds-imgtypes { display: flex; gap: 4px; padding-bottom: 12px; margin: 0 -14px; padding-left: 12px; border-bottom: 1px solid var(--line); }
.ds-imgtypes .ds-icon.on { background: var(--raise); color: var(--text); box-shadow: inset 0 0 0 1px var(--line2); }
.ds-imgtools { display: flex; align-items: center; gap: 6px; }
.ds-imgtools .ds-select { width: 130px; }
.ds-imgprev-btn { display: block; width: 100%; padding: 0; border-radius: 10px; overflow: hidden; background: var(--field); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; }
.ds-imgprev-btn:hover { box-shadow: inset 0 0 0 1px var(--line2); }
.ds-imgprev { display: block; width: 100%; height: auto; max-height: 300px; object-fit: contain; background: var(--field); }
.ds-adjrow { display: grid; grid-template-columns: 86px 1fr; align-items: center; gap: 10px; min-height: 30px; }
.ds-adjrow > span { color: var(--soft); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
input[type=range].ds-pill-range { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; margin: 0; padding: 0; background: none; cursor: pointer; }
input[type=range].ds-pill-range::-webkit-slider-runnable-track { height: 20px; border-radius: 10px; background: var(--field); box-shadow: inset 0 0 0 1px var(--line2); }
input[type=range].ds-pill-range::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .18), 0 1px 3px rgba(0, 0, 0, .25); }
input[type=range].ds-pill-range:focus::-webkit-slider-thumb { box-shadow: 0 0 0 2px var(--accent-line), 0 1px 3px rgba(0, 0, 0, .25); }
input[type=range].ds-pill-range::-moz-range-track { height: 20px; border-radius: 10px; background: var(--field); }
input[type=range].ds-pill-range::-moz-range-thumb { width: 20px; height: 20px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
input[type=range].ds-pill-range:focus { outline: none; }
.ds-adjreset { justify-self: start; padding: 2px 0; }

/* Figma-style colour picker */
.ds-swbtn { padding: 0; cursor: pointer; }
.ds-colorpop { width: 264px; display: grid; gap: 12px; padding: 12px 12px 14px; }
.ds-colorpop .ds-pop-head { margin: 0 -12px; padding: 0 10px 10px 8px; border-bottom: 1px solid var(--line); }
.ds-colorpop .ds-imgtypes { border: 0; margin: 0; padding: 0; }
.ds-imgpop .ds-imgtypes { margin: 0 -14px; }
.ds-contrast { display: flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; color: var(--text); }
.ds-contrast-dot { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line2); }
.ds-contrast-grade { margin-left: auto; padding: 2px 7px; border-radius: 6px; background: var(--raise); font: 600 10.5px/1.4 var(--ui-font); }
.ds-contrast-grade.bad { color: #e5484d; }
.ds-sv { position: relative; height: 220px; border-radius: 8px; cursor: crosshair; touch-action: none; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.ds-sv-knob { position: absolute; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; box-shadow: 0 0 0 2.5px #fff, 0 0 0 3.5px rgba(0, 0, 0, .25), 0 2px 6px rgba(0, 0, 0, .3); pointer-events: none; }
.ds-csliders { display: grid; grid-template-columns: 28px 1fr; align-items: center; gap: 8px; }
.ds-cstack { display: grid; gap: 10px; }
input[type=range].ds-hue, input[type=range].ds-alpha { -webkit-appearance: none; appearance: none; width: 100%; height: 14px; margin: 0; border-radius: 7px; cursor: pointer; }
input[type=range].ds-hue { background: linear-gradient(90deg, red, #ff0, lime, cyan, blue, #f0f, red); }
input[type=range].ds-alpha { background: linear-gradient(90deg, transparent, var(--c, #000)), conic-gradient(#ccc 25%, #fff 0 50%, #ccc 0 75%, #fff 0) 0 0 / 8px 8px; }
input[type=range].ds-hue::-webkit-slider-thumb, input[type=range].ds-alpha::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: transparent; box-shadow: 0 0 0 2.5px #fff, 0 0 0 3.5px rgba(0, 0, 0, .25), 0 1px 4px rgba(0, 0, 0, .3); }
input[type=range].ds-hue::-moz-range-thumb, input[type=range].ds-alpha::-moz-range-thumb { width: 14px; height: 14px; border: 2px solid #fff; border-radius: 50%; background: transparent; }
input[type=range].ds-hue:focus, input[type=range].ds-alpha:focus { outline: none; }
.ds-cfields { display: grid; grid-template-columns: 70px 1fr auto; gap: 4px; align-items: center; }
.ds-cfmt { height: 30px; }
.ds-cvals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; }
.ds-cvals.one { grid-template-columns: 1fr; }
.ds-cnum { min-width: 0; height: 30px; padding: 0 6px; border: 0; border-radius: 6px; background: var(--field); color: var(--text); font: 12px var(--ui-font); font-variant-numeric: tabular-nums; outline: none; text-align: center; }
.ds-cnum.hex { text-align: left; padding-left: 9px; text-transform: uppercase; }
.ds-cnum:focus { box-shadow: inset 0 0 0 1.5px var(--accent-line); }
.ds-cop { display: flex; align-items: center; gap: 2px; width: 62px; padding-right: 6px; border-radius: 6px; background: var(--field); color: var(--muted); }
.ds-cop .ds-cnum { width: 38px; background: none; }
.ds-swhead { padding-top: 10px; margin: 0 -12px; padding-left: 12px; padding-right: 12px; border-top: 1px solid var(--line); }
.ds-swhead .ds-select { width: 100%; height: 30px; }
.ds-swgrid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 7px; }
.ds-swc { aspect-ratio: 1; padding: 0; border-radius: 5px; box-shadow: inset 0 0 0 1px rgba(127, 127, 127, .3); }
.ds-swc:hover { transform: scale(1.1); }
input[type=range].ds-pill-range::-webkit-slider-thumb { margin-top: 0; }
input[type=range].ds-hue::-webkit-slider-runnable-track, input[type=range].ds-alpha::-webkit-slider-runnable-track { height: 14px; background: transparent; border-radius: 7px; }
input[type=range].ds-hue::-webkit-slider-thumb, input[type=range].ds-alpha::-webkit-slider-thumb { margin-top: -1px; }
input[type=range].ds-hue::-moz-range-track, input[type=range].ds-alpha::-moz-range-track { background: transparent; }
.ds-pop > button.ds-imgprev-btn { display: block; height: auto; padding: 0; grid-template-columns: none; }
.ds-pop > button.ds-imgprev-btn:hover { background: var(--field); }
.ds-pop > button.ds-adjreset { display: block; height: auto; padding: 2px 0; background: none; color: var(--accent-text); }
.ds-pop > button.ds-adjreset:hover { background: none; color: var(--accent-text); text-decoration: underline; }

/* animation gallery */
.ds-anim-switch { padding: 0 6px 10px; }
.ds-insp .ds-anim-switch { padding: 0 0 10px; }
.ds-fam-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 8px; padding: 0 6px 12px; }
.ds-insp .ds-fam-grid { padding: 0 0 12px; }
.ds-fam { display: grid; gap: 7px; padding: 0; background: none; color: var(--text); text-align: left; }
.ds-fam:hover { background: none; }
.ds-fam-prev { width: 100%; aspect-ratio: 4 / 5; border-radius: 10px; background: #0c0c0d; box-shadow: inset 0 0 0 1px var(--line); transition: transform .2s, box-shadow .2s; }
.ds-fam:hover .ds-fam-prev { box-shadow: inset 0 0 0 1px var(--line2), 0 6px 18px rgba(0, 0, 0, .25); transform: translateY(-1px); }
.ds-fam span { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; padding: 0 2px; }
.ds-fam b { font-weight: 500; font-size: 12px; }
.ds-fam small { color: var(--muted); font-size: 10.5px; font-variant-numeric: tabular-nums; }

/* Animate tab: Motion (In · Loop · Out), Keyframes */
.ds-mrow { display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 8px; margin: 2px 0; }
.ds-mlabel { color: var(--soft); font-size: 11.5px; }
.ds-mrow.on .ds-mlabel { color: var(--text); font-weight: 500; }
.ds-mchip { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px 0 4px; border-radius: 8px; background: var(--raise); color: var(--soft); font-size: 11.5px; text-align: left; }
.ds-mchip:hover { color: var(--text); box-shadow: inset 0 0 0 1px var(--line2); }
.ds-mchip.on { color: var(--text); }
.ds-mchev { display: grid; color: var(--muted); transform: rotate(90deg); }
.ds-msub { margin: 4px 0 12px 21px; padding-left: 10px; border-left: 1px solid var(--line); display: grid; gap: 0; }
.ds-msub .ds-slrow { grid-template-columns: 66px 1fr 62px; gap: 6px; }
.ds-mprev { position: relative; flex: none; width: 24px; height: 24px; border-radius: 6px; background: var(--panel); overflow: hidden; display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--line); }
.ds-mprev .mp { width: 10px; height: 10px; border-radius: 3px; background: var(--text); animation: 1.8s cubic-bezier(.16, 1, .3, 1) infinite; }
.ds-mprev .mp.none { background: none; box-shadow: inset 0 0 0 1.2px var(--muted); animation: none; }
.mp-fade { animation-name: mp-fade !important; } .mp-rise { animation-name: mp-rise !important; } .mp-drop { animation-name: mp-drop !important; }
.mp-left { animation-name: mp-left !important; } .mp-right { animation-name: mp-right !important; } .mp-pop { animation-name: mp-pop !important; }
.mp-zoom { animation-name: mp-zoom !important; } .mp-blur { animation-name: mp-blur !important; } .mp-spin { animation-name: mp-spin !important; }
.mp.mp-out { animation-direction: reverse; animation-timing-function: cubic-bezier(.55, 0, 1, .45); }
@keyframes mp-fade { 0%, 8% { opacity: 0; } 55%, 100% { opacity: 1; } }
@keyframes mp-rise { 0%, 8% { opacity: 0; transform: translateY(9px); } 55%, 100% { opacity: 1; transform: none; } }
@keyframes mp-drop { 0%, 8% { opacity: 0; transform: translateY(-9px); } 55%, 100% { opacity: 1; transform: none; } }
@keyframes mp-left { 0%, 8% { opacity: 0; transform: translateX(12px); } 55%, 100% { opacity: 1; transform: none; } }
@keyframes mp-right { 0%, 8% { opacity: 0; transform: translateX(-12px); } 55%, 100% { opacity: 1; transform: none; } }
@keyframes mp-pop { 0%, 8% { opacity: 0; transform: scale(.4); } 55%, 100% { opacity: 1; transform: none; } }
@keyframes mp-zoom { 0%, 8% { opacity: 0; transform: scale(1.8); } 55%, 100% { opacity: 1; transform: none; } }
@keyframes mp-blur { 0%, 8% { opacity: 0; filter: blur(4px); } 55%, 100% { opacity: 1; filter: none; } }
@keyframes mp-spin { 0%, 8% { opacity: 0; transform: rotate(-120deg) scale(.5); } 55%, 100% { opacity: 1; transform: none; } }
.ds-mprev .mp[class*='mp-loop-'] { animation-duration: 1.6s; animation-timing-function: ease-in-out; }
.mp-loop-float { animation-name: mpl-float !important; } .mp-loop-drift { animation-name: mpl-drift !important; } .mp-loop-pulse { animation-name: mpl-pulse !important; }
.mp-loop-spin { animation-name: mpl-spin !important; animation-timing-function: linear !important; } .mp-loop-wiggle { animation-name: mpl-wiggle !important; } .mp-loop-breathe { animation-name: mpl-breathe !important; }
@keyframes mpl-float { 50% { transform: translateY(-4px); } }
@keyframes mpl-drift { 50% { transform: translateX(4px); } }
@keyframes mpl-pulse { 50% { transform: scale(1.25); } }
@keyframes mpl-spin { to { transform: rotate(360deg); } }
@keyframes mpl-wiggle { 25% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } }
@keyframes mpl-breathe { 50% { opacity: .35; } }
.mp-dot { animation-name: mp-dot !important; } .mp-through { animation-name: mp-through !important; } .mp-iris { animation-name: mp-iris !important; }
.mp-torn { animation-name: mp-torn !important; } .mp-wipe { animation-name: mp-wipe !important; } .mp-curtain { animation-name: mp-curtain !important; }
.mp-patches { animation-name: mp-patches !important; animation-timing-function: steps(5, end) !important; } .mp-draw { animation-name: mp-draw !important; }
.mp-loop-rove { animation-name: mpl-rove !important; }
@keyframes mp-dot { 0%, 8% { opacity: 0; width: 3px; height: 3px; border-radius: 50%; } 30% { opacity: 1; width: 10px; height: 10px; border-radius: 50%; } 55%, 100% { width: 18px; height: 10px; border-radius: 5px; } }
@keyframes mp-through { 0%, 8% { opacity: 0; transform: scale(5); } 20% { opacity: 1; } 55%, 100% { opacity: 1; transform: none; } }
@keyframes mp-iris { 0%, 8% { clip-path: circle(0% at 50% 50%); } 55%, 100% { clip-path: circle(75% at 50% 50%); } }
@keyframes mp-torn { 0%, 8% { clip-path: polygon(50% 50%, 50% 50%, 50% 50%, 50% 50%, 50% 50%, 50% 50%); } 55%, 100% { clip-path: polygon(50% -30%, 120% 10%, 115% 90%, 50% 130%, -20% 95%, -15% 5%); } }
@keyframes mp-wipe { 0%, 8% { clip-path: inset(0 100% 0 0); } 55%, 100% { clip-path: inset(0 0 0 0); } }
@keyframes mp-curtain { 0%, 8% { clip-path: inset(0 0 100% 0); } 55%, 100% { clip-path: inset(0 0 0 0); } }
@keyframes mp-patches { 0%, 8% { opacity: 0; } 55%, 100% { opacity: 1; } }
@keyframes mp-draw { 0%, 8% { background: none; box-shadow: inset 0 0 0 1.5px transparent; clip-path: inset(0 100% 0 0); } 55%, 100% { background: none; box-shadow: inset 0 0 0 1.5px var(--text); clip-path: inset(0 0 0 0); } }
@keyframes mpl-rove { 25% { transform: translate(4px, -3px) rotate(4deg); } 50% { transform: translate(0, 3px); } 75% { transform: translate(-4px, -3px) rotate(-4deg); } }
.ds-pop.ds-mpick { width: 264px; padding: 10px; }
.ds-mpick-head { padding: 0 2px 8px; color: var(--soft); font-size: 11px; font-weight: 500; }
.ds-mgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.ds-pop .ds-mgrid > .ds-mtile { display: grid; justify-items: center; gap: 5px; height: auto; padding: 8px 2px 6px; border-radius: 8px; background: none; color: var(--soft); font-size: 10.5px; }
.ds-pop .ds-mgrid > .ds-mtile:hover { background: var(--raise); color: var(--text); }
.ds-pop .ds-mgrid > .ds-mtile.on { background: var(--raise); color: var(--text); box-shadow: inset 0 0 0 1px var(--line2); }
.ds-mtile .ds-mprev { width: 40px; height: 40px; border-radius: 9px; }
.ds-mtile .ds-mprev .mp { width: 14px; height: 14px; border-radius: 4px; }
.ds-easebtn { display: flex; align-items: center; gap: 7px; height: 26px; padding: 0 8px 0 4px; border-radius: 7px; background: var(--raise); color: var(--text); font-size: 11.5px; grid-column: 2 / -1; justify-self: start; }
.ds-easebtn i { display: grid; color: var(--soft); }
.ds-easebtn:hover { box-shadow: inset 0 0 0 1px var(--line2); }
.ds-pop button > i svg { display: block; }
.ds-kfrow { display: grid; grid-template-columns: 70px 1fr 22px; align-items: center; gap: 6px; height: 30px; }
.ds-kfrow .ds-muted { font-size: 11.5px; }
.ds-kfrow.keyed .ds-muted { color: var(--text); }
.ds-recbtn { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 8px; }
.ds-recbtn i { width: 8px; height: 8px; border-radius: 50%; box-shadow: inset 0 0 0 1.3px currentColor; }
.ds-recbtn.on { color: #ff5a4e; background: rgba(255, 90, 78, .12); }
.ds-recbtn.on i { background: #ff5a4e; box-shadow: none; animation: ds-rec 1.2s ease-in-out infinite; }

/* title lists (animation library, Animate panel) */
.ds-tlist { display: grid; padding: 0 6px 8px; }
.ds-insp .ds-tlist { padding: 0 0 8px; }
.ds-trow { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 8px; border-radius: 7px; background: none; color: var(--soft); font-size: 12px; text-align: left; }
.ds-trow span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-trow small { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ds-trow:hover:not(:disabled) { background: var(--raise); color: var(--text); }
.ds-trow.on { color: var(--text); background: var(--raise); }
.ds-trow:disabled { opacity: .45; cursor: default; }
.ds-tchev { display: grid; color: var(--muted); margin-right: -2px; }
.ds-peek { position: fixed; z-index: 60; width: 140px; height: 175px; border-radius: 12px; overflow: hidden; background: #0c0c0d; box-shadow: var(--pop-shadow), inset 0 0 0 1px var(--line); pointer-events: none; animation: ds-peek .14s ease-out; }
.ds-peek canvas { width: 100%; height: 100%; display: block; }
@keyframes ds-peek { from { opacity: 0; transform: translateX(-4px); } }
/* Animate panel */
.ds-mt-transport { display: flex; align-items: center; gap: 2px; padding: 4px 10px 6px 8px; }
.ds-mt-transport .ds-icon { color: var(--text); }
.ds-mt-time { padding-left: 4px; color: var(--soft); font: 500 11px/1 'DM Mono', ui-monospace, monospace; text-transform: uppercase; font-variant-numeric: tabular-nums; }
.ds-mt-target { margin: 0 14px 6px; padding: 7px 10px; border-radius: 8px; background: var(--raise); color: var(--text); font-size: 11.5px; }
.ds-mt-target.none { background: none; color: var(--muted); padding: 2px 0; }
.ds-fold { display: flex; align-items: center; gap: 6px; width: calc(100% - 12px); height: 32px; margin: 2px 6px 0; padding: 0 8px; border-radius: 7px; background: none; color: var(--text); font-size: 12px; font-weight: 500; text-align: left; }
.ds-fold i { display: grid; color: var(--muted); transition: transform .15s; }
.ds-fold.on i { transform: rotate(90deg); }
.ds-fold small { color: var(--muted); font-weight: 400; font-size: 11px; }
.ds-fold:hover { background: var(--raise); }
.ds-mt-preset .ds-mprev { width: 20px; height: 20px; border-radius: 5px; }
.ds-mt-preset .ds-mprev .mp { width: 8px; height: 8px; border-radius: 2px; }
.ds-mt-check, .ds-mt-curve, .ds-mt-ic { display: grid; color: var(--muted); }
.ds-mt-check { color: var(--text); }
.ds-trow.on .ds-mt-curve { color: var(--text); }

/* quiet text tabs and filter chips (Assets) */
.ds-ttabs { display: flex; gap: 14px; padding: 2px 14px 10px; }
.ds-ttabs button { height: 24px; padding: 0; background: none; color: var(--muted); font-size: 12.5px; font-weight: 500; white-space: nowrap; position: relative; }
.ds-ttabs button:hover { color: var(--soft); }
.ds-ttabs button.on { color: var(--text); }
.ds-ttabs button.on::after { content: ''; position: absolute; left: 0; right: 0; bottom: -3px; height: 1.5px; border-radius: 1px; background: var(--text); }
.ds-chips { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 6px 10px; }
.ds-insp .ds-chips { padding: 0 0 10px; }
.ds-chips button { height: 24px; padding: 0 10px; border-radius: 999px; background: none; color: var(--soft); font-size: 11.5px; box-shadow: inset 0 0 0 1px var(--line); }
.ds-chips button:hover { color: var(--text); box-shadow: inset 0 0 0 1px var(--line2); }
.ds-chips button.on { background: var(--text); color: var(--panel); box-shadow: none; }
.ds-ttabs { gap: 12px; }
.ds-ttabs button { font-size: 12px; }
.ds-tgroup { padding: 10px 14px 4px; color: var(--muted); font-size: 11px; font-weight: 500; }
.ds-anim-lib .ds-tgroup:first-of-type { padding-top: 2px; }
.ds-ttabs { gap: 10px; padding-right: 10px; }
.ds-tchev svg, .ds-anim-back svg { width: 12px; height: 12px; display: block; }
.ds-trow.go small { margin-right: 2px; }
.ds-ex-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 8px; padding: 2px 8px 12px; }
.ds-insp .ds-ex-grid { padding: 2px 0 12px; }
.ds-ex { display: grid; gap: 6px; padding: 0; background: none; color: var(--soft); text-align: left; font-size: 11.5px; }
.ds-ex span { padding: 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-ex-thumb { width: 100%; aspect-ratio: 4 / 5; border-radius: 10px; background: #0c0c0d; box-shadow: inset 0 0 0 1px var(--line); }
.ds-ex:hover { background: none; color: var(--text); }
.ds-ex:hover .ds-ex-thumb { box-shadow: inset 0 0 0 1px var(--line2), 0 0 0 2px var(--line2); }
[data-theme="light"] .ds-ex-thumb { background: #f4f4f5; }

/* Tools: studio templates and full apps */
.ds-tools-note { margin: 0 14px 10px; }
.ds-pad-t { padding-top: 4px; }
.ds-sg-photos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.ds-sg-photos button { padding: 0; aspect-ratio: 1; border-radius: 6px; overflow: hidden; background: var(--raise); box-shadow: inset 0 0 0 1px var(--line); }
.ds-sg-photos button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ds-sg-photos button.on { box-shadow: 0 0 0 2px var(--accent-line); }
.ds-sg-area { width: 100%; min-height: 52px; resize: vertical; padding: 6px 8px; font: inherit; line-height: 1.4; }
.ds-appsheet { position: fixed; inset: 10px; z-index: 80; display: flex; flex-direction: column; background: var(--panel); border-radius: 14px; box-shadow: var(--pop-shadow), 0 0 0 1px var(--line); overflow: hidden; animation: ds-sheet .18s ease-out; }
@keyframes ds-sheet { from { opacity: 0; transform: translateY(8px) scale(.995); } }
.ds-appsheet-bar { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 8px 0 16px; border-bottom: 1px solid var(--line); }
.ds-appsheet-bar strong { font-size: 13px; font-weight: 600; }
.ds-appsheet-bar small { color: var(--muted); font-size: 11.5px; }
.ds-appsheet iframe { flex: 1; width: 100%; border: 0; background: #000; }

/* kinetic type */
.ds-kfx { display: grid; grid-template-columns: 44px 1fr; gap: 8px; align-items: start; margin: 4px 0 6px; }
.ds-kfx .ds-mlabel { padding-top: 5px; }
.ds-kchips { display: flex; flex-wrap: wrap; gap: 4px; }
.ds-kchips button { height: 24px; padding: 0 9px; border-radius: 999px; background: none; color: var(--soft); font-size: 11.5px; box-shadow: inset 0 0 0 1px var(--line); }
.ds-kchips button:hover { color: var(--text); box-shadow: inset 0 0 0 1px var(--line2); }
.ds-kchips button.on { background: var(--text); color: var(--panel); box-shadow: none; }
.ds-kseg button { font-size: 11.5px; }
.ds-check { display: flex; align-items: center; gap: 8px; height: 28px; color: var(--soft); font-size: 11.5px; cursor: pointer; }
.ds-kgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ds-kgrid.ds-pad { padding: 0 8px 12px; }
.ds-pop.ds-kpick { width: 300px; padding: 10px; max-height: 70vh; overflow: auto; }
.ds-pop .ds-kgrid > .ds-ktile, .ds-ktile { display: grid; gap: 4px; justify-items: stretch; height: auto; padding: 6px; border-radius: 9px; background: none; color: var(--soft); font-size: 11px; text-align: left; }
.ds-ktile:hover, .ds-pop .ds-kgrid > .ds-ktile:hover { background: var(--raise); color: var(--text); }
.ds-kprev { width: 100%; height: auto; aspect-ratio: 5 / 2; border-radius: 7px; background: var(--raise); box-shadow: inset 0 0 0 1px var(--line); }
.ds-sg-swatches { display: inline-flex; flex: none; }
.ds-sg-swatches i { width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 0 1.5px var(--panel); margin-right: -4px; }
.ds-sg-swatches i:last-child { margin-right: 6px; }
.ds-sg-color { height: 30px; padding: 2px; width: 100%; }
.ds-kfx { grid-template-columns: 44px minmax(0, 1fr); }
.ds-insp .ds-msub { min-width: 0; }
.ds-insp .ds-msub .ds-slrow { grid-template-columns: 58px minmax(0, 1fr) 56px; }
.ds-insp .ds-msub .ds-slrow > .ds-seg { grid-column: 2 / -1; min-width: 0; }
.ds-shape-grid { grid-template-columns: repeat(3, 1fr); }
.ds-ex-thumb.ds-shape-thumb { aspect-ratio: 1; }

/* ───────── 3D (Design ▸ 3D, Animate ▸ 3D motion) ───────── */
.ds-sub3d { margin: 10px 0 2px; font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.ds-sub3d:first-child { margin-top: 0; }
.ds-mats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.ds-mat { display: grid; justify-items: center; gap: 4px; padding: 6px 2px 5px; border-radius: 8px; background: none; color: var(--soft); font-size: 10px; line-height: 1.1; text-align: center; }
.ds-mat:hover { background: var(--field); color: var(--text); }
.ds-mat.on { background: var(--field); color: var(--text); box-shadow: 0 0 0 1px var(--text) inset; }
.ds-mat-ball { width: 26px; height: 26px; border-radius: 50%; display: block; box-shadow: inset -3px -4px 8px rgba(0,0,0,.35), 0 1px 2px rgba(0,0,0,.25); }
.m-glass { background: radial-gradient(circle at 32% 28%, #fff 0 10%, rgba(255,255,255,.2) 22%, rgba(170,200,255,.25) 60%, rgba(255,255,255,.55) 92%); box-shadow: inset 0 0 0 1px rgba(255,255,255,.35), 0 1px 2px rgba(0,0,0,.2); }
.m-liquid { background: radial-gradient(circle at 30% 26%, #fff 0 9%, transparent 20%), conic-gradient(from 200deg, rgba(120,220,255,.6), rgba(255,140,220,.55), rgba(255,240,150,.55), rgba(120,220,255,.6)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.45); }
.m-frosted { background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.9), rgba(220,228,240,.55) 60%, rgba(180,190,205,.6)); }
.m-chrome { background: linear-gradient(180deg, #fff 0 30%, #7d838c 46%, #1b1d21 52%, #9a8f82 70%, #f1ebe1); }
.m-metal { background: radial-gradient(circle at 35% 30%, #e6e8eb, #8a9099 55%, #3d4148); }
.m-gold { background: radial-gradient(circle at 35% 30%, #fff1c2, #e3b04f 50%, #7a5413); }
.m-plastic { background: radial-gradient(circle at 32% 28%, #fff 0 8%, #ff6a4a 25%, #b8321c 90%); }
.m-clay { background: radial-gradient(circle at 38% 34%, #e9b9a0, #b87a62 70%, #8d5844); box-shadow: inset -3px -4px 8px rgba(0,0,0,.25); }
.m-vinyl { background: radial-gradient(circle at 34% 30%, #fff 0 7%, #7fd0ff 24%, #1d78c8 90%); }
.m-fabric { background: radial-gradient(circle at 40% 36%, #c9b7f2, #7d66c4 80%); filter: saturate(.85); }
.m-pearl { background: radial-gradient(circle at 34% 30%, #fff, #f2e6f3 40%, #d6e6f2 70%, #c9bfd6); }
.m-stone { background: radial-gradient(circle at 36% 30%, #ecebe7, #c4c1ba 45%, #8f8c86 85%); box-shadow: inset -3px -4px 8px rgba(0,0,0,.28), 0 1px 2px rgba(0,0,0,.25); }
.m-basalt { background: radial-gradient(circle at 36% 30%, #8b8a87, #4a4a48 50%, #252524 90%); }
.ds-orb.rock { width: 58%; aspect-ratio: 1.1; border-radius: 0; display: grid; place-items: center; clip-path: polygon(14% 9%, 58% 2%, 92% 16%, 99% 55%, 86% 92%, 40% 99%, 6% 80%, 1% 38%); background: radial-gradient(circle at 34% 28%, #f1efeb 0, #cfccc5 38%, #9d9a93 78%, #77746e 100%); box-shadow: none; }
.ds-orb.rock b { font: 600 22px/1 'Cormorant Garamond', Georgia, serif; color: transparent; text-shadow: 1px 1px 0 rgba(255,255,255,.7), -1px -1px 0 rgba(0,0,0,.35); background: #9a978f; -webkit-background-clip: text; background-clip: text; }
.ds-orb.rock.dark { background: radial-gradient(circle at 34% 28%, #8d8c89 0, #5a5a58 40%, #333332 80%, #222 100%); }
.ds-orb-t.stone { font: 700 44px/1 'Cormorant Garamond', Georgia, serif; background: linear-gradient(160deg, #8b8a87 0%, #4a4a48 45%, #232322 100%); -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 3px 4px rgba(0,0,0,.3)); }
.m-neon { background: radial-gradient(circle, #fff 0 18%, #ff3fa8 40%, #5a0b3b 80%); box-shadow: 0 0 10px #ff3fa8, inset 0 0 0 1px rgba(255,255,255,.3); }
.ds-light3d { align-items: center; gap: 12px; }
.ds-light3d .ds-slrow { margin: 0; }
.ds-seg.wrap { flex-wrap: wrap; } .ds-seg.wrap button { flex: 1 0 22%; }
/* Insert panel */
.ds-ins-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 0 10px 6px; }
.ds-ins { display: grid; justify-items: center; gap: 5px; padding: 10px 4px 8px; border-radius: 9px; background: var(--field); color: var(--soft); font-size: 10.5px; line-height: 1.15; text-align: center; }
.ds-ins:hover { color: var(--text); box-shadow: 0 0 0 1px var(--line2) inset; }
.ds-ins i { display: grid; place-items: center; width: 22px; height: 22px; }
.ds-ins i svg { width: 18px; height: 18px; }
.ds-ins-note { padding: 0 12px 6px; margin: 0; }
.ds-ins-make { margin: 0 10px 6px; width: calc(100% - 20px); display: flex; gap: 6px; justify-content: center; align-items: center; }
.ds-ins-make svg { width: 14px; height: 14px; }
.ds-ins-shapes { padding: 4px 10px 6px; }
.ds-ins-logos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 0 10px 8px; }
.ds-ins-logo { aspect-ratio: 1; border-radius: 8px; background: #fff; display: grid; place-items: center; padding: 6px; }
.ds-ins-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ds-howto { margin: 6px 0 0; padding-left: 18px; color: var(--soft); font-size: 11.5px; line-height: 1.5; }
.ds-howto li { margin: 2px 0; }
.ds-ins-shapes { grid-template-columns: repeat(4, 1fr) !important; gap: 4px !important; } .ds-ins-shapes .ds-ex span { font-size: 10px; }
/* Generative fills */
.ds-genthumb { width: 20px; height: 20px; border-radius: 5px; padding: 0; flex: none; }
.ds-genname { display: flex; align-items: center; gap: 4px; background: none; color: var(--text); font-size: 12px; padding: 0 4px; min-width: 0; }
.ds-genname span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-genname svg { width: 8px; height: 8px; opacity: .6; flex: none; }
.ds-gen { display: grid; gap: 4px; }
.ds-gengal { margin: 2px 0 6px; }
.ds-gengal .ds-tgroup { padding-left: 0; }
.ds-gengrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 8px; padding: 0 0 8px; }
.ds-insert-gen .ds-gengrid, .ds-layers .ds-gengrid { padding: 0 10px 6px; }
.ds-gentile { display: grid; gap: 6px; padding: 0; background: none; color: var(--soft); font-size: 11px; line-height: 1.25; text-align: left; border-radius: 8px; min-width: 0; }
.ds-gentile canvas { width: 100%; height: auto; aspect-ratio: 8 / 5; border-radius: 8px; background: #0c0c0e; display: block; box-shadow: 0 0 0 1px var(--line); filter: grayscale(1); }
.ds-gentile span { padding: 0 2px; }
.ds-gentile:hover { color: var(--text); } .ds-gentile:hover canvas { box-shadow: 0 0 0 1px var(--text); }
.ds-gentile.on canvas { box-shadow: 0 0 0 2px var(--text); }
.ds-code { width: 100%; box-sizing: border-box; font: 11px/1.5 ui-monospace, "SF Mono", Menlo, monospace; background: var(--field); color: var(--text); border: 0; border-radius: 8px; padding: 8px 10px; resize: vertical; tab-size: 2; white-space: pre; }
.ds-code:focus { outline: 1px solid var(--text); }
.ds-code-err { margin: 0; padding: 6px 8px; border-radius: 6px; background: rgba(229, 72, 77, .14); color: #ff8a8d; font: 10.5px/1.4 ui-monospace, Menlo, monospace; white-space: pre-wrap; }
/* Jene AI */
.ds-tool-ai svg { width: 16px; height: 16px; }
.ds-tool-ai.on { background: var(--text); color: var(--panel); }
.ds-main > .ai, main > .ai { top: 12px; right: 12px; bottom: 76px; z-index: 30; }

/* ───────── the dock: tools + Jene AI's prompt bar, one row at the bottom of the canvas ───────── */
.ds-dock { position: absolute; left: calc(50% + (var(--ds-lw) + var(--ds-lo) - var(--ds-rw)) / 2); bottom: 14px; transform: translateX(-50%); z-index: 6; max-width: calc(100% - var(--ds-lw) - var(--ds-lo) - var(--ds-rw) - 32px); }
.ds.ui-hidden .ds-dock { left: 50%; max-width: calc(100% - 32px); }
.ds-dock-row { display: flex; align-items: flex-end; gap: 8px; }
.ds-dock .ds-toolbar { position: static; transform: none; left: auto; bottom: auto; flex: none; }
.ds-timeline { bottom: calc(var(--dock-h, 40px) + 22px); transition: bottom .18s ease; }

.aid { display: flex; flex-direction: column; flex: none; padding: 10px; border-top: 1px solid var(--line); }
.aid-bar { box-shadow: inset 0 0 0 1px var(--line2) !important; }
.ds-insp .aid-bar textarea { min-height: 40px; }
.aid-bar:focus-within { box-shadow: inset 0 0 0 1.5px var(--text) !important; }
.aid-bar { display: flex; flex-direction: column; background: var(--panel); border-radius: 12px; box-shadow: var(--pop-shadow); overflow: hidden; }
.aid-bar .ai-input { margin: 0; border: 0; background: none; border-radius: 0; padding: 4px 4px 4px 10px; min-height: 40px; align-items: center; }
.aid.focus .aid-bar .ai-input { align-items: flex-end; }
.aid-spark { display: grid; place-items: center; width: 18px; height: 32px; color: var(--text); flex: none; }
.aid-spark svg { width: 15px; height: 15px; }
.aid-bar textarea { font-size: 13px; padding: 7px 0; }
.aid-bar .ai-send { background: var(--text); color: var(--panel); border-radius: 8px; }
.aid-bar .ai-send:disabled { background: var(--field); color: var(--muted); }
.aid-hist { width: 28px; height: 28px; padding: 0; display: grid; place-items: center; background: none; color: var(--soft); border-radius: 7px; flex: none; }
.aid-hist:hover { background: var(--raise); color: var(--text); }
.aid-hist svg { width: 14px; height: 14px; }
.aid-ctx { display: none; flex-wrap: wrap; gap: 5px; padding: 9px 10px 2px; }
.aid.focus .aid-ctx:not(:empty) { display: flex; }
.aid-chip { height: 24px; padding: 0 9px; display: inline-flex; align-items: center; border-radius: 999px; background: var(--field); color: var(--soft); font-size: 11px; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; border: 0; }
button.aid-chip:hover { color: var(--text); box-shadow: inset 0 0 0 1px var(--line2); }
.aid-chip.ctx { background: var(--text); color: var(--panel); font-weight: 600; }
.aid-drawer { display: none; flex-direction: column; max-height: min(42vh, 420px); background: var(--panel); border-radius: 12px; box-shadow: var(--pop-shadow); overflow: hidden; }
.ds-insp .aid-drawer { display: flex; height: 100%; max-height: none; border-radius: 0; box-shadow: none; background: none; }
.ds-insp .aid-dhead { border-bottom: 1px solid var(--line); }
.aid-dhead { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border-bottom: 1px solid var(--line); }
.aid-dhead b { font-size: 12px; font-weight: 600; }
.aid-dhead .spacer { flex: 1; }
.aid-drawer .ai-log { flex: 1; min-height: 0; }
.aid.busy .aid-spark { animation: aid-pulse 1.2s ease-in-out infinite; }
@keyframes aid-pulse { 50% { opacity: .35; } }

/* Figma-style: the selection's actions above the toolbar; the prompt box floats beside the selection */
.ds-dock { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ds-ctxbar { display: flex; align-items: center; gap: 2px; padding: 4px; background: var(--panel); border-radius: 12px; box-shadow: var(--pop-shadow); }
.ds-ctxbar[hidden] { display: none; }
.ds-ctx { height: 32px; padding: 0 10px; display: flex; align-items: center; gap: 6px; background: none; color: var(--text); border-radius: 8px; font-size: 12.5px; white-space: nowrap; }
.ds-ctx:hover { background: var(--raise); }
.ds-ctx i { display: grid; place-items: center; width: 16px; height: 16px; }
.ds-ctx i svg { width: 15px; height: 15px; }
.ds-ctx.ds-ctx-ai { color: var(--text); font-weight: 600; }
.ds-ctx-sep { width: 1px; height: 20px; background: var(--line2); margin: 0 4px; }
.aid-status { display: flex; align-items: center; gap: 8px; padding: 0 12px 10px; font-size: 12px; color: var(--soft); }
.aid-status[hidden] { display: none; }
.aid-status.error { color: #e5484d; }
.aid-st { flex: 1; min-width: 0; }
.aid-more { background: none; color: var(--text); font-size: 12px; font-weight: 600; padding: 0; text-decoration: underline; flex: none; }

/* ───── Figma layout: no rail; left = Layers | Assets | AI, right = Design | Animate | Export ───── */
.ds-left .ds-tabs { padding: 8px 10px 8px; gap: 4px; }
.ds-left .ds-tabs[hidden] { display: none; }
.ds-left .ds-tabs button { height: 28px; padding: 0 10px; font-size: 12px; }
/* AI fills the left panel: conversation, then the prompt */
.ds-left.ai .ds-layers { overflow: hidden; padding: 0; display: flex; flex-direction: column; }
.ds-layers > .aid-drawer { display: flex; flex: 1; min-height: 0; max-height: none; border-radius: 0; box-shadow: none; background: none; }
.ds-layers > .aid-drawer .aid-dhead { display: none; }
.aid-drawer .aid-bar textarea { min-height: 40px; }

/* Assets: search, then the kinds as picture cards */
.ds-assets-head { position: sticky; top: -6px; z-index: 2; margin: -6px -6px 2px; padding: 8px 10px; background: var(--panel); }
.ds-assets-q { width: 100%; }
.ds-ac-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 2px 8px 6px; }
.ds-ac { display: flex; flex-direction: column; gap: 7px; padding: 0; background: none; color: var(--text); text-align: left; min-width: 0; border-radius: 10px; }
.ds-ac:hover { background: none; }
.ds-ac-pv { aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden; border-radius: 10px; background: var(--field); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .15s, transform .15s; }
.ds-ac:hover .ds-ac-pv { box-shadow: inset 0 0 0 1.5px var(--text); }
.ds-ac-pv > canvas { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 0; box-shadow: none; aspect-ratio: auto; background: none; }
.ds-ac-pv > .ds-kprev { width: 80%; height: auto; object-fit: contain; }
.ds-ac-l { display: flex; align-items: baseline; gap: 6px; padding: 0 2px; min-width: 0; }
.ds-ac-l b { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-ac-l small { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ds-ac-trio { display: flex; gap: 6px; padding: 0 12%; }
.ds-ac-trio canvas { width: 33%; height: auto; aspect-ratio: 1; border-radius: 0; box-shadow: none; background: none; }
.ds-ac-ic { display: grid; place-items: center; color: var(--soft); }
.ds-ac-ic svg { width: 26px; height: 26px; }
/* one tile for every grid inside a kind */
.ds-at-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 8px; padding: 4px 8px 12px; }
.ds-at { display: flex; flex-direction: column; gap: 6px; padding: 0; background: none; color: var(--text); min-width: 0; }
.ds-at:hover { background: none; }
.ds-at-pv { aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; border-radius: 10px; background: var(--field); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); transition: box-shadow .15s; }
.ds-at:hover .ds-at-pv { box-shadow: inset 0 0 0 1.5px var(--text); }
.ds-at-pv > svg { width: 22px; height: 22px; }
.ds-at-pv > canvas { width: 100%; height: 100%; object-fit: cover; border-radius: 0; box-shadow: none; aspect-ratio: auto; background: none; }
.ds-at-pv > canvas.ds-shape-thumb { width: 78%; height: 78%; object-fit: contain; }
.ds-at-pv > canvas.ds-kprev { width: 90%; height: auto; object-fit: contain; }
.ds-at-pv > img { max-width: 72%; max-height: 72%; object-fit: contain; }
.ds-at-l { font-size: 11px; color: var(--soft); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-at:hover .ds-at-l { color: var(--text); }
/* 3D previews: a lit chrome orb; type previews in the Brand fonts' weights */
.ds-orb { width: 46%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 34% 28%, #fff 0 6%, #d9dde3 14%, #8a9099 38%, #2a2d33 66%, #0c0d10 82%, #3a3f47 100%); box-shadow: 0 10px 18px -8px rgba(0,0,0,.45); }
.ds-orb.hero { width: 38%; }
.ds-orb.box, .ds-orb.cube, .ds-orb.rounded { border-radius: 22%; }
.ds-orb.capsule, .ds-orb.pill { width: 30%; aspect-ratio: 1 / 1.7; border-radius: 999px; }
.ds-orb.torus, .ds-orb.ring { background: none; box-shadow: none; border: 9px solid #8a9099; border-color: #c9cdd3 #5d636c #1b1d21 #8a9099; }
.ds-orb.cylinder { width: 40%; aspect-ratio: 1 / 1.25; border-radius: 30% / 14%; }
.ds-orb.cone { border-radius: 0; width: 46%; clip-path: polygon(50% 4%, 96% 92%, 4% 92%); }
.ds-orb-t { font-size: 30px; font-weight: 800; letter-spacing: -.02em; background: linear-gradient(180deg, #fff 0%, #a7adb6 40%, #2a2d33 60%, #9aa0a8 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 4px 6px rgba(0,0,0,.35)); }
.ds-ramp { font-weight: 700; letter-spacing: -.02em; color: var(--text); }
.ds-ramp.hero { font-size: 34px; } .ds-ramp.headline { font-size: 24px; } .ds-ramp.body { font-size: 15px; font-weight: 500; }

/* Brand in the right panel (nothing selected), drawn like Figma's sections, not cards */
.ds-insp .ds-brand-head { padding: 14px 12px 6px; border-top: 1px solid var(--line); }
.ds-insp .ds-bsec { background: none; border-radius: 0; margin: 0; }
.ds-insp .ds-bsec-head { height: 32px; padding: 0 12px; font-weight: 500; }
.ds-insp .ds-bsec-head:hover { background: var(--raise); }
.ds-insp .ds-bsec-body { padding: 4px 12px 12px; }
.ds-cards-glyph { position: relative; width: 60%; height: 64%; }
.ds-cards-glyph i { position: absolute; top: 8%; left: 30%; width: 40%; height: 84%; border-radius: 7px; background: linear-gradient(160deg, #f1f2f4, #b9bec6); box-shadow: 0 6px 14px -6px rgba(0,0,0,.4); }
.ds-cards-glyph i:nth-child(1) { transform: translateX(-62%) rotate(-12deg) scale(.88); background: linear-gradient(160deg, #ff8a5c, #e2502f); }
.ds-cards-glyph i:nth-child(2) { transform: translateX(62%) rotate(12deg) scale(.88); background: linear-gradient(160deg, #6ea8ff, #3b6fe0); }
.ds-cards-glyph i:nth-child(3) { z-index: 1; background: linear-gradient(160deg, #26282d, #0d0e10); }


/* ───── v3 (15 Nov): Surface's calm, Arqe's structure, Figma's logic. Top bar, rail, panels as soft grey sheets,
   inspector sections as grey groups that fold to one row. Monochrome chrome; colour comes from the work. ───── */
.ds { --ui-font: "Geist", "Inter", system-ui, -apple-system, sans-serif; --ds-top: 48px; --ds-rail: 62px; --ds-lo: 62px; --ds-lw: 264px; --ds-rw: 276px;
  --grp: #262629; --grp-2: #2E2E32; --chip: #2B2B2F; --chip-on: #3A3A3F; --ink-btn: #F2F2F2; --ink-btn-text: #0C0C0E; letter-spacing: .012em; }
:root[data-theme="light"] .ds { --grp: #EFEFEF; --grp-2: #E7E7E9; --chip: #E5E5E8; --chip-on: #FFFFFF; --ink-btn: #0C0C0E; --ink-btn-text: #FFFFFF; }
:root { --ds-canvas: #0E0E10; }
:root[data-theme="light"] { --ds-canvas: #F2F2F2; }
.ds { font-family: var(--ui-font); }
.ds-main { top: var(--ds-top); }
.ds-top { position: absolute; left: 0; right: 0; top: 0; height: var(--ds-top); z-index: 8; display: flex; align-items: center; gap: 6px; padding: 0 12px 0 14px; background: var(--ds-canvas); }
.ds-top .ds-file-meta { flex: 0 1 auto; }
.ds-top .ds-file { font-weight: 500; font-size: 12px; }
.ds-top .ds-primary { background: var(--ink-btn); color: var(--ink-btn-text); height: 30px; padding: 0 14px; border-radius: 8px; letter-spacing: 0; }
.ds-top .ds-primary:hover { background: var(--ink-btn); color: var(--ink-btn-text); opacity: .9; }
.ds-top .ds-secondary { height: 30px; padding: 0 13px; border-radius: 8px; background: var(--grp); color: var(--text); font-weight: 500; letter-spacing: 0; }
.ds-left, .ds-right { top: var(--ds-top); border-radius: 8px; box-shadow: none; }
.ds-rail { display: flex; top: var(--ds-top); width: 54px; border-radius: 8px; box-shadow: none; padding-top: 14px; gap: 8px; }
.ds-rail-btn { width: 46px; }
.ds-rail-btn i { width: 34px; height: 32px; border-radius: 8px; }
.ds-rail-btn i svg { width: 16px; height: 16px; }
.ds-rail-btn span { font-size: 9px; font-weight: 500; }
.ds-rail-btn.on i { background: var(--grp); box-shadow: none; }
.ds.ui-hidden .ds-top { display: none; }
.ds.ui-hidden .ds-main { top: 0; }
/* right panel: Design | Motion | Export as Surface's segmented control */
.ds-right .ds-tabs, .ds-atabs { border: 0; padding: 14px 12px 8px; gap: 2px; display: flex; }
.ds-right .ds-tabs button, .ds-atabs button { flex: 1; height: 36px; border-radius: 8px; font-weight: 450; color: var(--muted); background: none; border: 0; }
.ds-right .ds-tabs button.on, .ds-atabs button.on { background: var(--grp); color: var(--text); }
.ds-atabs { padding: 4px 4px 10px; }
.ds-crumb { display: flex; gap: 6px; padding: 0 10px 10px; color: var(--muted); }
.ds-crumb b { color: var(--text); font-weight: 500; }
/* inspector sections as grey groups */
.ds-insp { padding: 0 12px 28px; }
.ds-insp > .ds-sec { border: 0; background: var(--grp); border-radius: 10px; margin: 0 0 8px; padding: 0 12px 12px; gap: 8px; }
.ds-insp > .ds-sec > .ds-sec-head { min-height: 36px; padding: 0; font-weight: 500; cursor: default; }
.ds-insp > .ds-sec.closed { padding-bottom: 0; }
.ds-insp > .ds-sec.closed > :not(.ds-sec-head) { display: none !important; }
.ds-grp-chev { display: grid; place-items: center; width: 14px; height: 14px; color: var(--muted); transform: rotate(90deg); transition: transform .15s; flex: none; order: 99; }
.ds-grp-chev svg { width: 9px; height: 9px; }
.ds-sec.closed .ds-grp-chev { transform: rotate(0deg); }
.ds-insp .ds-field, .ds-insp .ds-num, .ds-insp .ds-select, .ds-insp .ds-input { background: var(--chip); }
.ds-insp .ds-seg { background: var(--chip); }
.ds-insp .ds-seg button.on { background: var(--chip-on); }
/* Motion panel kinds, Media */
.ds-kinds { display: flex; gap: 10px; padding: 10px 10px 16px; }
.ds-kind { display: flex; flex-direction: column; align-items: center; gap: 6px; background: none; border: 0; color: var(--muted); font-size: 10px; padding: 0; }
.ds-kind i { width: 48px; height: 48px; border-radius: 10px; background: var(--grp); display: grid; place-items: center; }
.ds-kind i svg { width: 17px; height: 17px; }
.ds-kind.on { color: var(--text); }
.ds-kind.on i { background: var(--grp-2); box-shadow: inset 0 0 0 1px var(--line2); }
.ds-media-add { display: flex; align-items: center; gap: 8px; width: calc(100% - 20px); margin: 2px 10px 6px; height: 34px; padding: 0 10px; border-radius: 8px; border: 0; background: var(--grp); color: var(--text); font-weight: 500; }
.ds-media-add i { display: grid; place-items: center; }
.ds-media-add i svg { width: 14px; height: 14px; }
.ds-media-add small { margin-left: auto; color: var(--muted); font-size: 10px; }
.ds-media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ds-media-grid .ds-at-pv { aspect-ratio: 4 / 5; }
.ds-at-pv > img { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; }
.ds-at-grid .ds-at-l:empty { display: none; }
/* floating bars: white sheets, no heavy shadows */
.ds-toolbar, .ds-canvasbar, .ds-ctxbar { box-shadow: 0 0 0 1px var(--line2), 0 6px 18px rgba(0, 0, 0, .06); }
.ds-toolbar .ds-tool.on { background: var(--ink-btn); color: var(--ink-btn-text); }
.ds-timeline { border-radius: 8px; box-shadow: 0 0 0 1px var(--line); }
/* monochrome leftovers: links, checkboxes, dots */
.ds .ds-link, .ds .ds-link:hover { color: var(--text); }
.ds .ds-link:disabled { color: var(--muted); }
.ds input[type="range"] { accent-color: var(--text); }
.ds input[type="checkbox"], .ds input[type="radio"], .ds-modal input[type="checkbox"], .ds-pop input[type="checkbox"] { accent-color: var(--accent); }
.ds .ds-dot { background: var(--text); }
/* the timeline docks along the bottom of the canvas (Arqe); the tools float above it, never stacked over it */
.ds-timeline { left: calc(var(--ds-lo) + var(--ds-lw) + 2 * var(--ds-gap)); right: calc(var(--ds-rw) + 2 * var(--ds-gap)); width: auto; bottom: var(--ds-gap); transform: none; }
.ds.ui-hidden .ds-timeline { left: var(--ds-gap); right: var(--ds-gap); width: auto; }
.ds-dock { bottom: calc(14px + var(--tl-h, 0px)); transition: bottom .18s ease; }
/* card-animation glyph in monochrome */
.ds-cards-glyph i { background: linear-gradient(160deg, #f1f2f4, #c9ccd2); }
.ds-cards-glyph i:nth-child(1) { background: linear-gradient(160deg, #9aa0a8, #5d636c); }
.ds-cards-glyph i:nth-child(2) { background: linear-gradient(160deg, #d4d4d8, #a1a1aa); }
.ds-cards-glyph i:nth-child(3) { background: linear-gradient(160deg, #26282d, #0d0e10); }
/* icons never take the click: the button does, so swapping an icon can't swallow a press */
.ds button svg, .ds button i { pointer-events: none; }

/* Shader picker: every media shader, previewed on the selected layer (sits beside the inspector) */
.ds-shpick { position: fixed; z-index: 60; width: 392px; max-height: min(640px, calc(100vh - 16px)); overflow: auto; padding: 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line2); box-shadow: 0 14px 34px rgba(0,0,0,.25); }
.ds-shpick-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.ds-shpick-head strong { font-size: 12px; font-weight: 600; }
.ds-shpick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ds-shpick-g { grid-column: 1 / -1; margin: 6px 0 0; }
.ds-shpick-t { display: flex; flex-direction: column; gap: 4px; padding: 0; border: 0; background: none; color: var(--text); font: inherit; font-size: 11px; text-align: left; cursor: pointer; }
.ds-shpick-t canvas { width: 100%; aspect-ratio: 4 / 3; border-radius: 6px; background: var(--chip, #eee); outline: 1px solid var(--line); }
.ds-shpick-t:hover canvas { outline-color: var(--muted); }
.ds-shpick-t.on canvas { outline: 2px solid var(--text); }
.ds-shcols { flex-wrap: wrap; gap: 6px; }
.ds-insp .ds-btn.ds-shpick-open { justify-content: space-between; display: flex; align-items: center; }
.ds-insp .ds-btn.ds-shpick-open svg { width: 10px; height: 10px; }
.ds-spring { display: flex; flex-direction: column; gap: 4px; margin: 4px 0 6px; }
.ds-spring-curve { display: block; padding: 6px 8px; border-radius: 8px; background: var(--chip, rgba(0,0,0,.04)); color: var(--text); }
.ds-spring-curve svg { width: 100%; height: 64px; display: block; }
.ds-skill { display: flex; flex-direction: column; gap: 4px; padding: 8px 0; border-top: 1px solid var(--line); }
.ds-skill.off { opacity: .55; }
.ds-skill-text { white-space: pre-wrap; font: 11.5px/1.45 inherit; font-family: inherit; }
/* asset folders */
.ds-fold-top { display: flex; align-items: center; gap: 6px; padding-right: 8px; }
.ds-fold-empty { padding: 0 14px 8px; margin: 0; }
.ds-fold { display: flex; align-items: center; gap: 6px; height: 30px; margin: 0 8px; padding: 0 4px 0 6px; border-radius: 6px; cursor: default; font-size: 12px; }
.ds-fold:hover { background: var(--chip, rgba(0,0,0,.04)); }
.ds-fold.drop { outline: 1.5px solid var(--text); outline-offset: -1.5px; }
.ds-fold-chev svg { width: 10px; height: 10px; transition: transform .15s; opacity: .6; }
.ds-fold.open .ds-fold-chev svg { transform: rotate(90deg); }
.ds-fold-ic svg { width: 15px; height: 15px; opacity: .8; }
.ds-fold .ds-input { height: 24px; }
.ds-fold > button { opacity: 0; } .ds-fold:hover > button { opacity: 1; }
.ds-fstyle-pv { display: block; width: 100%; height: 100%; border-radius: 6px; }
.ds-fstyle-pv.txt { display: grid; place-items: center; font-size: 26px; background: var(--chip, #eee); color: var(--text); }
.ds-fstyle-pv.fx { display: grid; place-items: center; background: var(--chip, #eee); }
/* Video with LTX */
.ds-insp .ds-btn.primary { background: var(--text); color: var(--panel); box-shadow: none; height: 32px; font-weight: 600; margin: 4px 0 2px; }
.ds-insp .ds-btn.primary:disabled { opacity: .5; }
.ds-ltx-prompt { white-space: pre-wrap; font-family: inherit; font-size: 12px; line-height: 1.4; }
.ds-ltx-jobs { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.ds-ltx-job { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; }
/* a long prompt is cut with … instead of widening the whole inspector */
.ds-ltx-jobs, .ds-ltx-job, .ds-ltx-job > .ds-row2, .ds-ltx-prompt { min-width: 0; max-width: 100%; }
.ds-ltx-bar { display: block; height: 3px; border-radius: 2px; background: var(--line2); overflow: hidden; }
.ds-ltx-bar b { display: block; height: 100%; background: var(--text); transition: width .4s; }
.ds-ltx-job.failed small { color: #c44; }

/* Glyphs: every character in a font */
.ds-glyphs { width: 330px; max-height: 420px; grid-template-rows: auto auto 1fr; gap: 6px; padding: 10px; }
.ds-glyphs-head { display: flex; justify-content: space-between; align-items: center; font-weight: 600; }
.ds-glyphs-q { height: 28px; padding: 0 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--field, transparent); color: var(--text); font: inherit; }
.ds-glyphs-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; overflow: auto; min-height: 0; }
.ds-glyphs-grid button { aspect-ratio: 1; display: grid; place-items: center; font-size: 20px; background: none; color: var(--text); border-radius: 6px; border: 0; cursor: pointer; }
.ds-glyphs-grid button:hover { background: var(--hover, rgba(127,127,127,.14)); }
.ds-recolor { display: flex; flex-wrap: wrap; gap: 4px; }
.ds-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.ds-seg.pf { flex: 1; } .ds-seg.pf button { flex: 1; display: grid; place-items: center; } .ds-seg.pf svg { width: 16px; height: 16px; }
/* the hex code always shows its six digits */
.ds-paint .ds-hex { min-width: 54px; flex: 1 1 54px; padding: 0 5px; }
.ds-levels .ds-lvls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.ds-lvl { display: grid; gap: 2px; font-size: 10.5px; color: var(--muted); }
.ds-lvl .ds-num-in { width: 100%; height: 24px; border-radius: 6px; border: 1px solid transparent; background: var(--field); color: var(--text); padding: 0 6px; font: inherit; font-size: 12px; }
.ds-curves > div { display: grid; gap: 6px; justify-items: start; }
.ds-curve { border-radius: 8px; background: var(--field); cursor: crosshair; touch-action: none; }
.ds-pa-prompt { width: 100%; resize: vertical; min-height: 44px; border-radius: 8px; border: 1px solid transparent; background: var(--field); color: var(--text); padding: 7px 9px; font: inherit; font-size: 12px; }
.ds-pa-prompt:focus { outline: none; border-color: var(--accent-line); }

/* ── UX pass (Figma / Framer best practice) ── */
/* the canvas controls live in the top bar, centred, flat: they never cover the design */
.ds-top .ds-canvasbar { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); box-shadow: none; background: transparent; padding: 0; gap: 2px; }
.ds.ui-hidden .ds-top .ds-canvasbar { left: 50%; }
.ds-top .ds-canvasbar .ds-cb[hidden] { display: none; }
/* every panel in the rail says what it is; the open one in full ink */
.ds-rail-btn span { display: block; margin-bottom: 4px; color: var(--muted); }
.ds-rail-btn.on span { color: var(--text); }
/* sections that are off (a + to add) sit as flat headers, the same height as folded ones (Figma's Effects, Framer's Effects) */
.ds-insp > .ds-sec.ds-sec-empty { padding-bottom: 0; }
.ds-insp > .ds-sec.ds-sec-empty > :not(.ds-sec-head) { display: none; }
.ds-insp > .ds-sec.ds-sec-empty .ds-grp-chev { display: none; }
.ds-insp > .ds-sec.ds-sec-empty > .ds-sec-head > span { color: var(--muted); font-weight: 450; }
.ds-insp > .ds-sec.ds-sec-empty:hover > .ds-sec-head > span { color: var(--text); }
/* a section with nothing under its header yet (Stroke, Effects, Auto layout before you add one) is just the header row */
.ds-insp > .ds-sec:not(:has(> :not(.ds-sec-head))) { padding-bottom: 0; }
.ds-insp > .ds-sec:not(:has(> :not(.ds-sec-head))) .ds-grp-chev { visibility: hidden; }
.ds-insp > .ds-sec:not(.closed):not(:has(> :not(.ds-sec-head))) > .ds-sec-head > span { color: var(--muted); font-weight: 450; }
.ds-insp > .ds-sec:not(.closed):not(:has(> :not(.ds-sec-head))):hover > .ds-sec-head > span { color: var(--text); }
/* the one export panel, under the Export button */
.ds-pop.ds-export-pop { width: 300px; padding: 12px; gap: 0; font-size: 11.5px; max-height: min(640px, 84vh); }
.ds-export-pop > .ds-sec { border: 0; padding: 10px 0 4px; gap: 6px; background: none; }
.ds-export-pop > .ds-sec + .ds-sec { border-top: 1px solid var(--line); margin-top: 6px; }
.ds-export-pop > .ds-sec > .ds-sec-head { min-height: 22px; padding: 0; font-weight: 600; }
.ds-export-pop > .ds-btn.wide { margin-top: 8px; }
.ds-export-pop .ds-empty { padding: 8px 4px; color: var(--muted); }
/* library tiles: one flat tile everywhere, no frame; the thing itself is the picture (Framer Insert, Figma Assets) */
.ds-at-pv, .ds-ac-pv { background: var(--field); box-shadow: none; border-radius: 12px; transition: background .15s, box-shadow .15s; }
.ds-at:hover .ds-at-pv, .ds-ac:hover .ds-ac-pv { background: var(--fill); box-shadow: inset 0 0 0 1px var(--line2); }
.ds-at-grid { gap: 12px 8px; padding: 4px 10px 14px; }
.ds-at { gap: 7px; }
.ds-at-l { font-size: 11px; color: var(--muted); }
.ds-at:hover .ds-at-l { color: var(--text); }
/* every shape sits at the same optical size */
.ds-at-pv > svg.ds-solid-pv { width: 44%; height: 44%; color: var(--text); }
.ds-at-pv > canvas.ds-shape-thumb { width: 52%; height: 52%; }
.ds-ac-trio { gap: 10px; padding: 0 18%; }
.ds-ac-trio canvas { width: 30%; }
/* type tiles never spill out of their square */
.ds-at-pv > .ds-ramp { line-height: 1; max-width: 86%; overflow: hidden; }
.ds-at-pv > .ds-ramp.hero { font-size: 30px; } .ds-at-pv > .ds-ramp.headline { font-size: 22px; } .ds-at-pv > .ds-ramp.body { font-size: 15px; }
.ds-ac-pv > .ds-ramp.hero { font-size: 40px; }
.ds-ac-ic { color: var(--text); opacity: .75; }
.ds-ac-ic svg { width: 24px; height: 24px; }
/* variables are monochrome like the rest of the editor */
.ds-vi { color: var(--soft); }
.ds-at-pv > canvas.ds-ex-thumb.ds-shape-thumb, .ds-ac-trio canvas.ds-ex-thumb { background: none; box-shadow: none; border-radius: 0; }
.ds-at-pv > canvas.ds-shape-thumb { width: 70%; height: 70%; }
.ds-ac-pv > .ds-ramp.hero { font-size: 34px; line-height: 1; }
.ds-xscope { grid-auto-flow: row; grid-template-columns: auto 1fr; margin-bottom: 8px; } .ds-xscope button { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 8px; }
/* export: the three quiet actions under the main button, and the export list */
.ds-xmore { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 6px; }
.ds-xmore .ds-btn { height: 30px; padding: 0 6px; font-size: 11px; white-space: nowrap; }
.ds-xli { display: flex; align-items: center; gap: 8px; padding: 4px; border-radius: 8px; }
.ds-xli.on, .ds-xli:hover { background: var(--fill); }
.ds-xli-box { width: 34px; height: 34px; flex: none; border-radius: 7px; display: grid; place-items: center; overflow: hidden; background: repeating-conic-gradient(var(--field) 0 25%, var(--panel) 0 50%) 0 0 / 8px 8px; }
.ds-xli-pv { max-width: 28px; max-height: 28px; width: auto; height: auto; }
.ds-xli-name { flex: 1; min-width: 0; text-align: left; background: none; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0; height: auto; }

/* Add (rail): search, then one row of tabs; the content shows right under it */
.ds-add-head { display: grid; gap: 8px; padding-bottom: 6px; box-shadow: 0 1px 0 var(--line); }
.ds-addtabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 1px; }
.ds-addtabs button { height: 30px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 7px; background: none; color: var(--muted); }
.ds-addtabs button:hover { color: var(--text); background: var(--hover, var(--grp)); }
.ds-addtabs button.on { background: var(--grp); color: var(--text); }
.ds-addtabs svg { width: 16px; height: 16px; }
.ds-add-title { display: flex; align-items: baseline; gap: 6px; padding: 14px 14px 2px; }
.ds-add-title strong { font-size: 13px; font-weight: 600; }
.ds-add-title small { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ds-add-title + .ds-tools-note { margin-top: 2px; }
/* the card browser's own search is the Add search */
.ds-layers .ds-anim-lib .ds-anim-head { display: none; }
.ds-layers .ds-anim-lib { padding-top: 6px; }
/* AI: the skills sit above the conversation */
.ds-skills-bar { flex: none; display: flex; align-items: center; gap: 8px; margin: 8px 8px 0; padding: 0 10px; height: 32px; border: 0; border-radius: 8px; background: var(--grp); color: var(--text); font-size: 12px; text-align: left; }
.ds-skills-bar:hover { background: var(--field); }
.ds-skills-bar > i { display: grid; place-items: center; color: var(--soft); }
.ds-skills-bar svg { width: 14px; height: 14px; }
.ds-skills-bar small { color: var(--muted); font-size: 11px; }
.ds-skills-bar .ds-skills-chev svg { width: 10px; height: 10px; }
.ds-skills-pop { width: 300px; max-height: min(560px, calc(100vh - 32px)); overflow: auto; padding-bottom: 6px; }
.ds-skills-pop .ds-skill { margin: 0 10px 8px; }

/* First steps: a section in the right panel when nothing is selected */
.ds-guide-sec { display: grid; gap: 2px; }
.ds-guide-step { display: flex; align-items: flex-start; gap: 9px; padding: 6px 8px; margin: 0 -8px; border-radius: 9px; font-size: 12px; }
.ds-guide-step.next { background: var(--grp); }
.ds-guide-txt { flex: 1; min-width: 0; }
.ds-guide-txt b { font-weight: 500; }
.ds-guide-txt p { margin: 3px 0 0; color: var(--soft); line-height: 1.45; }
.ds-guide-step.done b { color: var(--muted); text-decoration: line-through; }
.ds-guide-step .ds-link { flex: none; font-size: 11.5px; color: var(--text); }
.ds-guide-check { width: 16px; height: 16px; flex: none; margin-top: 1px; border-radius: 50%; box-shadow: inset 0 0 0 1.3px var(--muted); display: grid; place-items: center; }
.ds-guide-step.done .ds-guide-check { background: var(--text); color: var(--panel); box-shadow: none; }
.ds-guide-check svg { width: 10px; height: 10px; }
/* Show me: a ring around the thing, a line of help beside it */
.ds-coach-ring { position: fixed; z-index: 95; pointer-events: none; border-radius: 10px; box-shadow: 0 0 0 2px var(--text), 0 0 0 6px color-mix(in srgb, var(--text) 18%, transparent); animation: ds-coach 1.4s ease-in-out infinite; }
@keyframes ds-coach { 50% { box-shadow: 0 0 0 2px var(--text), 0 0 0 10px color-mix(in srgb, var(--text) 6%, transparent); } }
.ds-coach-tip { position: fixed; z-index: 96; max-width: 240px; padding: 9px 12px; border-radius: 10px; background: var(--text); color: var(--panel); font: 500 12px/1.45 var(--ui-font); box-shadow: var(--pop-shadow); animation: ds-in .18s ease-out; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .ds-coach-ring { animation: none; } }

/* project tabs in the top bar (Figma's file tabs); they stop before the canvas controls in the middle */
.ds-ptabs { display: flex; align-items: center; gap: 2px; min-width: 0; max-width: calc(50% - 150px); overflow-x: auto; scrollbar-width: none; margin-left: 2px; }
.ds-ptabs::-webkit-scrollbar { display: none; }
.ds-ptab { position: relative; display: flex; align-items: center; gap: 2px; flex: 0 1 auto; min-width: 72px; max-width: 200px; height: 28px; padding: 0 2px 0 4px; border-radius: 8px; color: var(--muted); cursor: default; }
.ds-ptab:hover { background: var(--grp); color: var(--text); }
.ds-ptab.on { background: var(--panel); color: var(--text); box-shadow: 0 0 0 1px var(--line); }
.ds-ptab .ds-file { flex: 1; min-width: 40px; width: 100%; padding: 1px 4px; }
.ds-ptab-name { flex: 1; min-width: 0; padding: 0 4px; font: 500 12px/1.35 var(--ui-font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-ptab-x { flex: none; width: 20px; height: 20px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 5px; background: none; color: var(--muted); opacity: 0; }
.ds-ptab:hover .ds-ptab-x, .ds-ptab.on .ds-ptab-x { opacity: 1; }
.ds-ptab-x:hover { background: var(--field); color: var(--text); }
.ds-ptab-x svg { width: 10px; height: 10px; }
.ds-ptab-new { flex: none; width: 28px; height: 28px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--muted); }
.ds-ptab-new:hover { background: var(--grp); color: var(--text); }
.ds-ptab-new svg { width: 14px; height: 14px; }
/* 3D tiles: engine renders, sized like the other tiles' previews */
.ds-at-pv > .ds-3d-pv { width: 78%; height: 78%; display: block; object-fit: contain; background: none; box-shadow: none; border-radius: 0; }

/* ───────── premium pass (16 Nov, after Arqe and Surface): one flat inspector ─────────
   No tabs, no grey cards: sections are separated by a hairline, titled in 11px, with labels in a left column and
   the fields on the right. Empty sections are a title and a +; a section's other icons show when you point at it. */
.ds-right .ds-rtabs { display: none; }
.ds-insp { padding: 4px 0 28px; }
.ds-insp > .ds-sel-head { padding: 16px 16px 8px; font-size: 11px; }
.ds-insp > .ds-sel-head strong { font-weight: 500; }
.ds-insp > .ds-align { padding: 0 12px 10px; }
.ds-insp > .ds-note, .ds-insp > .ds-btnrow { margin: 0 16px 10px; }
.ds-insp > .ds-sec { background: none; border-radius: 0; margin: 0; padding: 0 16px 14px; gap: 6px; border-top: 1px solid color-mix(in srgb, var(--text) 7%, transparent); }
.ds-insp > .ds-sec > .ds-sec-head { min-height: 40px; font-weight: 500; font-size: 11px; letter-spacing: .01em; }
.ds-insp > .ds-sec.closed, .ds-insp > .ds-sec.ds-sec-empty, .ds-insp > .ds-sec:not(:has(> :not(.ds-sec-head))) { padding-bottom: 0; }
.ds-insp > .ds-sec > .ds-sec-head > .ds-icon { opacity: 0; transition: opacity .12s; }
.ds-insp > .ds-sec > .ds-sec-head > .ds-icon[title^="Add"], .ds-insp > .ds-sec > .ds-sec-head > .ds-icon.on, .ds-insp > .ds-sec:hover > .ds-sec-head > .ds-icon, .ds-insp > .ds-sec > .ds-sec-head > .ds-icon:focus-visible { opacity: 1; }
.ds-insp > .ds-sec.ds-sec-empty > .ds-sec-head > .ds-icon:not([title^="Add"]), .ds-insp > .ds-sec:not(:has(> :not(.ds-sec-head))) > .ds-sec-head > .ds-icon:not([title^="Add"]):not([title*="auto layout"]) { display: none; }
.ds-insp > .ds-sec .ds-grp-chev { opacity: 0; transition: opacity .12s; }
.ds-insp > .ds-sec:hover .ds-grp-chev, .ds-insp > .ds-sec.closed .ds-grp-chev { opacity: 1; }
.ds-insp .ds-num, .ds-insp .ds-select, .ds-insp .ds-input, .ds-insp .ds-field { height: 28px; border-radius: 6px; }
/* label column rows */
.ds-lrows { display: grid; gap: 6px; }
.ds-lrow { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: 6px; min-height: 28px; }
.ds-lrow-l { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-lrow-f { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; min-width: 0; }
.ds-lrow-f.one { grid-template-columns: minmax(0, 1fr); }
.ds-scale-row .ds-lrow-f.one { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
/* Arqe's keyframe diamond at the end of an animatable field: faint until you point at the field, solid when keyed here */
.ds-num.kf input { padding-right: 20px; }
.ds-num-kf { position: absolute; right: 3px; top: 50%; margin-top: -9px; opacity: 0; transition: opacity .12s; }
.ds-num:hover .ds-num-kf, .ds-num-kf.some, .ds-num-kf.on, .ds-num-kf:focus-visible { opacity: 1; }
.ds-num-kf.some::before { box-shadow: inset 0 0 0 1.3px var(--accent-line); }
/* Motion in the one inspector: 28px rows; with nothing set, one quiet row of In · Loop · Out */
.ds-insp .ds-mrow { grid-template-columns: 64px minmax(0, 1fr); gap: 6px; margin: 0; }
.ds-insp .ds-mlabel { color: var(--muted); font-size: 11px; }
.ds-insp .ds-mrow.on .ds-mlabel { color: var(--text); font-weight: 400; }
.ds-insp .ds-mchip { height: 28px; border-radius: 6px; background: var(--chip); font-size: 11px; padding: 0 8px 0 3px; gap: 6px; }
.ds-insp .ds-mchip .ds-mprev { transform: scale(.82); transform-origin: left center; }
.ds-mquick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.ds-mq { height: 28px; display: flex; align-items: center; justify-content: center; gap: 5px; border-radius: 6px; background: var(--chip); color: var(--muted); font-size: 11px; border: 0; }
.ds-mq svg { width: 11px; height: 11px; }
.ds-mq:hover { color: var(--text); }
/* the one "+" picker beside the inspector (Arqe): grouped tiles, each previewed on the layer */
.ds-sp { position: fixed; z-index: 60; width: 300px; max-height: min(680px, calc(100vh - 16px)); display: flex; flex-direction: column; border-radius: 10px; background: var(--panel); border: 1px solid var(--line2); box-shadow: 0 14px 34px rgba(0,0,0,.22); font-size: 11px; color: var(--text); }
.ds-sp-head { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 8px 0 14px; flex: none; }
.ds-sp-head strong { font-weight: 500; font-size: 11px; }
.ds-sp-head span:not(.ds-grow) { color: var(--muted); }
.ds-sp-body { overflow: auto; padding: 0 14px 14px; scrollbar-width: thin; }
.ds-sp-g { color: var(--muted); padding: 10px 0 8px; }
.ds-sp-g:first-child { padding-top: 0; }
.ds-sp-grid { display: grid; gap: 10px 8px; }
.ds-sp-t { display: flex; flex-direction: column; gap: 6px; padding: 0; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; min-width: 0; }
.ds-sp-t > span { color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-sp-t:hover > span, .ds-sp-t.on > span { color: var(--text); }
.ds-sp-pv { aspect-ratio: 4 / 3; border-radius: 6px; background: var(--chip); overflow: hidden; display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--line); }
.ds-sp-pv > canvas { width: 100%; height: 100%; display: block; object-fit: contain; }
.ds-sp-pv > .ds-kprev { width: 100%; height: auto; }
.ds-sp-t:hover .ds-sp-pv { box-shadow: inset 0 0 0 1px var(--muted); }
.ds-sp-t.on .ds-sp-pv { box-shadow: inset 0 0 0 2px var(--text); }
.ds-sp-pv > .ds-mprev.big { width: 100%; height: 100%; border-radius: 0; background: none; box-shadow: none; }
.ds-mprev.big .mp { width: 40px; height: 30px; border-radius: 4px; background-size: contain; background-repeat: no-repeat; background-color: color-mix(in srgb, var(--text) 30%, transparent); background-position: center; }
.ds-mprev.big .mp.pic { background-color: transparent; }
.ds-mprev.big .mp.none { background: none; box-shadow: inset 0 0 0 1.2px var(--muted); }
.ds-sec-head .ds-icon.ds-sp-open { opacity: 1 !important; background: var(--raise); }
/* Jene AI references: pictures, files and links attached to the next message */
.ai-clip { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 7px; background: none; color: var(--muted); align-self: flex-end; margin-bottom: 2px; }
.ai-clip:hover { color: var(--text); background: var(--raise); }
.ai-clip svg { width: 15px; height: 15px; }
.aid-bar .aid-spark + .ai-clip { margin-left: -4px; }
.aid-refs { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 8px 0; }
.aid-refs[hidden] { display: none; }
.aid-ref { display: inline-flex; align-items: center; gap: 6px; height: 30px; max-width: 100%; padding: 0 4px 0 3px; border-radius: 7px; background: var(--field); color: var(--text); font-size: 11px; }
.aid-ref img { width: 24px; height: 24px; border-radius: 5px; object-fit: cover; flex: none; }
.aid-ref-ic { width: 24px; height: 24px; border-radius: 5px; display: grid; place-items: center; background: var(--panel); color: var(--muted); font-size: 8.5px; font-weight: 600; letter-spacing: .04em; flex: none; }
.aid-ref.link .aid-ref-ic { font-size: 12px; }
.aid-ref-n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.aid-ref-x { width: 20px; height: 20px; display: grid; place-items: center; border: 0; border-radius: 5px; background: none; color: var(--muted); padding: 0; }
.aid-ref-x:hover { color: var(--text); background: var(--raise); }
.aid-ref-x svg { width: 11px; height: 11px; }
.ai-refs-sent { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.ai-refs-sent img { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; }
.ai-refs-sent span { font-size: 10.5px; opacity: .75; word-break: break-all; }
.aid-drawer.dropping, .aid.dropping, .ai.dropping { box-shadow: inset 0 0 0 2px var(--text); }

/* ───────── Jene Slides: the strip on the left, the slide's notes, and the player ───────── */
.ds-deck-switch { padding: 8px 10px 4px; }
.ds-deck-head { display: flex; align-items: center; gap: 6px; padding: 8px 10px 8px 14px; }
.ds-deck-head strong { font-weight: 500; }
.ds-deck-head small { color: var(--muted); }
.ds-deck-play { height: 26px; padding: 0 10px 0 8px; gap: 5px; font-size: 11px; }
.ds-deck-play svg { width: 12px; height: 12px; }
.ds-deck-list { display: grid; gap: 10px; padding: 2px 10px 10px 6px; }
.ds-deck-row { display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: start; gap: 4px; cursor: pointer; border-radius: 8px; }
.ds-deck-n { color: var(--muted); font-size: 10.5px; text-align: right; padding-top: 2px; font-variant-numeric: tabular-nums; }
.ds-deck-thumb { position: relative; border-radius: 6px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); background: #0c0c0e; }
.ds-deck-thumb canvas { display: block; width: 100%; height: auto; }
.ds-deck-row:hover .ds-deck-thumb { box-shadow: 0 0 0 1px var(--muted); }
.ds-deck-row.on .ds-deck-thumb { box-shadow: 0 0 0 2px var(--text); }
.ds-deck-row.on .ds-deck-n { color: var(--text); }
.ds-deck-row.skip .ds-deck-thumb { opacity: .4; }
.ds-deck-row.dragging { opacity: .4; }
.ds-deck-row.drop-before .ds-deck-thumb { box-shadow: 0 -3px 0 0 var(--text); }
.ds-deck-row.drop-after .ds-deck-thumb { box-shadow: 0 3px 0 0 var(--text); }
.ds-deck-note { position: absolute; right: 5px; bottom: 5px; width: 6px; height: 6px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.4); }
.ds-deck-add { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: center; gap: 6px; width: calc(100% - 20px); margin: 0 10px 10px; height: 32px; border: 0; border-radius: 8px; background: var(--chip); color: var(--text); font: inherit; font-size: 11px; }
.ds-deck-add svg { width: 12px; height: 12px; }
.ds-deck-add:hover { background: var(--chip-on); }
.ds-deck-notes-l { color: var(--muted); margin-top: 4px; }
.ds-insp .ds-deck-notes-in { height: auto; min-height: 96px; padding: 8px; line-height: 1.45; resize: vertical; font: inherit; }
/* the player */
.ds-deck { position: fixed; inset: 0; z-index: 100; background: #000; outline: none; animation: ds-fade .2s ease-out; color: #f2f2f2; font: 12px var(--ui-font, system-ui); }
.ds-deck canvas { display: block; }
.ds-deck.leaving { opacity: 0; transition: opacity .18s ease-in; }
.ds-deck.idle:not(.presenter) { cursor: none; }
.ds-deck-bar { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 12px; background: rgba(28,28,30,.82); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 10px 30px rgba(0,0,0,.4), inset 0 0 0 1px rgba(255,255,255,.08); transition: opacity .3s ease, transform .3s ease; }
.ds-deck.idle .ds-deck-bar { opacity: 0; transform: translate(-50%, 8px); pointer-events: none; }
.ds-deck-b { height: 30px; min-width: 30px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 8px; border: 0; border-radius: 8px; background: none; color: #e9e9ea; font: inherit; }
.ds-deck-b:hover { background: rgba(255,255,255,.1); }
.ds-deck-b:disabled { opacity: .35; }
.ds-deck-b.on { background: rgba(255,255,255,.16); }
.ds-deck-count { min-width: 54px; text-align: center; color: #bdbdc2; font-variant-numeric: tabular-nums; }
.ds-deck-sep { width: 1px; height: 18px; background: rgba(255,255,255,.12); margin: 0 4px; }
.ds-deck-pv { display: none; }
.ds-deck.presenter .ds-deck-pv { display: grid; position: absolute; inset: 0; grid-template-columns: 62% 38%; grid-template-rows: 52px auto 1fr; pointer-events: none; }
.ds-deck-pv-top { grid-column: 1 / -1; display: flex; align-items: center; gap: 18px; padding: 0 24px; border-bottom: 1px solid rgba(255,255,255,.08); pointer-events: auto; }
.ds-deck-timer { border: 0; background: none; color: #fff; font: 500 22px/1 var(--ui-font, system-ui); font-variant-numeric: tabular-nums; padding: 0; cursor: pointer; }
.ds-deck-timer.paused { color: #8c8c91; }
.ds-deck-pos { color: #a5a5aa; }
.ds-deck-clock { margin-left: auto; color: #a5a5aa; font-variant-numeric: tabular-nums; }
.ds-deck-next { grid-column: 2; grid-row: 2; padding: 16px 24px 12px 12px; display: grid; gap: 8px; }
.ds-deck-next-l { color: #8c8c91; }
.ds-deck-next canvas { width: 100%; height: auto; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.ds-deck-notes { grid-column: 2; grid-row: 3; overflow: auto; padding: 8px 24px 90px 12px; pointer-events: auto; }
.ds-deck-notes p { margin: 0 0 12px; font-size: 20px; line-height: 1.45; color: #f2f2f2; }
.ds-deck-notes p.empty { color: #6e6e73; font-size: 15px; }
.ds-deck-b span { white-space: nowrap; }
/* file tabs take the free width (Figma): the canvas controls sit on the right with zoom; tabs shrink evenly, then scroll */
.ds-top .ds-canvasbar { position: static; transform: none; left: auto; top: auto; margin: 0 4px 0 8px; flex: none; }
.ds-top > .ds-spacer { flex: 0 0 8px; }
.ds-ptabs { flex: 1 1 auto; max-width: none; margin-right: 8px; }
.ds-ptab { flex: 0 1 200px; min-width: 96px; max-width: 220px; }
.ds-top .ds-canvasbar::after { content: ''; width: 1px; height: 18px; background: var(--line); margin-left: 6px; }

/* ───────── Files (Home): Figma's file browser ───────── */
.ds-home-btn { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: var(--muted); margin-left: 2px; }
.ds-home-btn:hover, .ds-home-btn.on { background: var(--grp); color: var(--text); }
.ds-home-btn svg { width: 16px; height: 16px; }
.ds-home { position: absolute; inset: var(--ds-top) 0 0 0; z-index: 30; display: grid; grid-template-columns: 240px minmax(0, 1fr); background: var(--ds-canvas); outline: none; animation: ds-fade .14s ease-out; }
.ds-home-side { display: flex; flex-direction: column; gap: 2px; padding: 12px 10px; border-right: 1px solid color-mix(in srgb, var(--text) 7%, transparent); overflow: auto; }
.ds-home-brand { display: flex; align-items: center; gap: 8px; padding: 6px 8px 14px; }
.ds-home-brand i { display: grid; width: 18px; height: 18px; }
.ds-home-brand svg { width: 18px; height: 18px; }
.ds-home-brand strong { font-weight: 600; font-size: 13px; }
.ds-home-nav { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px; border: 0; border-radius: 7px; background: none; color: var(--soft); font: inherit; text-align: left; }
.ds-home-nav i { display: grid; color: var(--muted); }
.ds-home-nav svg { width: 15px; height: 15px; }
.ds-home-nav small { color: var(--muted); }
.ds-home-nav:hover { background: var(--grp); color: var(--text); }
.ds-home-nav.on { background: var(--grp); color: var(--text); font-weight: 500; }
.ds-home-sub { display: flex; align-items: center; justify-content: space-between; padding: 18px 4px 6px 8px; color: var(--muted); }
.ds-home-hint { color: var(--muted); padding: 4px 8px; line-height: 1.45; font-size: 11px; }
.ds-home-main { overflow: auto; padding: 22px 32px 48px; }
.ds-home-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.ds-home-head h1 { margin: 0; font-size: 22px; font-weight: 500; letter-spacing: -.01em; }
.ds-home-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.ds-home-new { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px 0 12px; border: 0; border-radius: 10px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); font: inherit; }
.ds-home-new:hover { box-shadow: inset 0 0 0 1px var(--muted); }
.ds-home-new svg { width: 15px; height: 15px; }
.ds-home-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 22px 18px; }
.ds-home-card { display: flex; flex-direction: column; gap: 10px; padding: 0; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.ds-home-pic { aspect-ratio: 16 / 10; border-radius: 10px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); display: grid; place-items: center; overflow: hidden; }
.ds-home-pic img { width: 100%; height: 100%; object-fit: contain; padding: 14px; box-sizing: border-box; }
.ds-home-pic i { color: var(--muted); display: grid; }
.ds-home-pic svg { width: 22px; height: 22px; }
.ds-home-card:hover .ds-home-pic { box-shadow: inset 0 0 0 1px var(--muted); }

.ds-home-meta { display: grid; gap: 3px; padding: 0 2px; }
.ds-home-meta strong { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-home-meta small { color: var(--muted); }
.ds-home-empty { color: var(--muted); }
/* Figma Slides: single-slide / grid switch in the strip, speaker notes under the slide */
.ds-deck-views .ds-seg { height: 26px; }
.ds-deck-views .ds-seg button { width: 28px; height: 22px; padding: 0; display: grid; place-items: center; }
.ds-deck-views .ds-seg svg { width: 14px; height: 14px; }
.ds-notesbar { position: absolute; left: calc(50% + (var(--ds-lw) + var(--ds-lo) - var(--ds-rw)) / 2); transform: translateX(-50%); bottom: 10px; z-index: 5; width: min(720px, calc(100% - var(--ds-lw) - var(--ds-lo) - var(--ds-rw) - 48px)); background: var(--panel); border-radius: 12px; box-shadow: var(--card-shadow, 0 8px 28px rgba(0, 0, 0, .14)), inset 0 0 0 1px var(--line); overflow: hidden; }
.ds-notesbar[hidden] { display: none; }
.ds.ui-hidden .ds-notesbar { left: 50%; }
.ds-notes-head { display: flex; align-items: center; gap: 10px; width: 100%; height: 36px; padding: 0 12px 0 14px; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.ds-notes-head span { font-weight: 500; flex: none; }
.ds-notes-head small { flex: 1; min-width: 0; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-notes-head i { display: grid; color: var(--muted); transform: rotate(-90deg); transition: transform .15s; }
.ds-notes-head svg { width: 9px; height: 9px; }
.ds-notesbar.open .ds-notes-head i { transform: rotate(90deg); }
.ds-notes-in { display: none; width: 100%; box-sizing: border-box; height: 128px; padding: 2px 14px 14px; border: 0; outline: none; resize: none; background: none; color: var(--text); font: 13px/1.5 var(--ui-font, system-ui); }
.ds-notesbar.open .ds-notes-in { display: block; }

.ds-main .ds-dock { bottom: calc(14px + var(--tl-h, 0px) + var(--notes-h, 0px)); }
.ds-main .ds-timeline { bottom: calc(64px + var(--notes-h, 0px)); }

/* Import from Figma */
.ds-fg { gap: 12px; }
.ds-fg-l { display: grid; gap: 4px; }
.ds-fg-l > span { font-size: 11px; color: var(--muted); }
.ds-fg-pages { display: grid; gap: 6px; max-height: 220px; overflow: auto; padding: 10px 12px; border-radius: 10px; background: var(--hover, rgba(127,127,127,.08)); }
.ds-fg-status:empty { display: none; }
.ds-fg-head { display: flex; align-items: center; gap: 8px; }
.ds-fg-head .ds-link { color: var(--text); font-weight: 500; }
.ds-fg-status.bad { color: #E5484D; }

/* Slides: the build order list */
.ds-build-row { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border: 0; border-radius: 8px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.ds-build-row:hover { background: var(--hover, rgba(127,127,127,.1)); }
.ds-build-row > b { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; background: var(--text); color: var(--panel); font-size: 10px; font-weight: 600; flex: none; }
.ai-icon.ai-savee.on { color: var(--text, #fff); }
.ai-icon.ai-savee.on::after { content: ""; position: absolute; width: 5px; height: 5px; border-radius: 9px; background: currentColor; transform: translate(7px, -7px); }
.ai-icon.ai-savee { position: relative; }
.ds-photo-q { width: 100%; }
.ds-photo-chips { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 12px 2px; }
.ds-photo-chips .ds-chip { height: 24px; padding: 0 9px; border-radius: 999px; border: 0; background: var(--ds-raise, rgba(255,255,255,.06)); color: var(--ds-muted, #999); font-size: 11px; cursor: pointer; }
.ds-photo-chips .ds-chip.on { background: var(--ds-text, #eee); color: var(--ds-bg, #111); }

/* device colour finishes (Design ▸ 3D ▸ Colour) */
.ds-dev-fin { display: flex; align-items: center; gap: 6px; flex: 1; flex-wrap: wrap; }
.ds-dev-sw { width: 20px; height: 20px; padding: 0; border-radius: 50%; border: 0; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18); cursor: pointer; }
.ds-dev-sw.orig { background: conic-gradient(#1d1d1f 0 25%, #d6d7d4 0 50%, #d9692e 0 75%, #2f3d55 0); }
.ds-dev-sw.on { box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--text); }
.ds-dev-fin .ds-color, .ds-dev-fin input[type=color] { margin-left: auto; }

/* Add ▸ Mockups: thin line device icons (fill the tile, follow the theme) */
.ds-at-pv > svg.ds-dev-ic { width: 100%; height: 100%; color: var(--text); }
