/* 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(13, 153, 255, .16); --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(13, 153, 255, .12); --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: #fff; 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); }
.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); }
.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); 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); z-index: 2; overflow-wrap: normal; word-break: normal; cursor: text; }
.ds-text-edit::selection, .ds-text-edit *::selection { background: rgba(13, 153, 255, .3); }

/* 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: #fff; }
.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; 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); }
.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); }
.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); }
.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); }
.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); justify-self: start; border-radius: 4px; }
.ds-link:hover { background: none; text-decoration: underline; color: var(--accent); }
.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: #fff; }
.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); 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); 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: #fff; }
.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); }
.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: #fff; }
.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); }
.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-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 44px; display: flex; align-items: center; gap: 14px; padding: 0 12px 0 18px; background: rgba(20, 20, 20, .9); color: #eee; font: 12px var(--ui-font); backdrop-filter: blur(12px); }
.ds-present-bar span { font-weight: 600; }
.ds-present-bar small { color: #999; margin-right: auto; }
.ds-present-bar button { height: 28px; padding: 0 12px; background: rgba(255, 255, 255, .1); color: #fff; border-radius: 7px; }
.ds-present-bar button:hover { background: rgba(255, 255, 255, .18); }

@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); color: var(--accent); }
.ds-tool-anim.on { background: var(--accent); color: #fff; }
.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); }
.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) 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); 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); 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); }
.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: #c6ff4d; color: #141a05; }
.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-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); }
.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), 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); }
.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); }
.ds-pop > button.ds-adjreset:hover { background: none; color: var(--accent); 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); }
.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-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(3, 1fr); gap: 5px; padding: 0 0 4px; }
.ds-insert-gen .ds-gengrid, .ds-layers .ds-gengrid { padding: 0 10px 6px; }
.ds-gentile { display: grid; gap: 4px; padding: 0; background: none; color: var(--soft); font-size: 10px; text-align: left; border-radius: 8px; }
.ds-gentile canvas { width: 100%; aspect-ratio: 4 / 3; border-radius: 7px; background: #0c0c0e; display: block; box-shadow: 0 0 0 1px var(--line) inset; }
.ds-gentile span { padding: 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.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; }
