/* ---------- Studio (full-screen editor) ---------- */
body.studio-open .shell { grid-template-columns: 1fr; }
body.studio-open .sidebar { display: none; }
body.studio-open main#view { padding: 0; }
.studio {
  --st-bg: #e9ebf0; --st-panel: var(--panel); --st-line: var(--border); --st-ink: var(--text); --st-mute: var(--muted);
  position: fixed; inset: 0; z-index: 20; display: grid; grid-template-columns: 64px var(--st-lw, 290px) 1fr var(--st-rw, 320px); grid-template-rows: 54px 1fr;
  grid-template-areas: "top top top top" "rail left work right"; background: var(--st-bg); color: var(--st-ink);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .studio { --st-bg: #021219; } }
.st-top { grid-area: top; display: flex; align-items: center; gap: 6px; padding: 0 12px; background: var(--st-panel); border-bottom: 1px solid var(--st-line); }
.st-name { border: 1px solid transparent; background: transparent; font-weight: 700; font-size: 15px; padding: 6px 8px; border-radius: 8px; width: 260px; }
.st-name:hover, .st-name:focus { border-color: var(--st-line); background: var(--panel-2); }
.st-size { font-size: 12px; color: var(--st-mute); font-variant-numeric: tabular-nums; }
.st-sep { width: 1px; height: 24px; background: var(--st-line); margin: 0 6px; }
.st-spacer { flex: 1; }
.st-iconbtn { width: 34px; height: 34px; display: inline-grid; place-items: center; border: 0; background: transparent; color: var(--st-ink); border-radius: 8px; cursor: pointer; text-decoration: none; }
.st-iconbtn:hover { background: var(--panel-2); }
.st-iconbtn.on { background: var(--accent-soft); color: var(--accent); }
.st-iconbtn.sm { width: 28px; height: 28px; }
.st-zoomval { min-width: 56px; border: 0; background: transparent; color: var(--st-ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; border-radius: 6px; padding: 6px; font-variant-numeric: tabular-nums; }
.st-zoomval:hover { background: var(--panel-2); }
.st-status { font-size: 12px; color: var(--st-mute); margin-right: 6px; display: inline-flex; align-items: center; gap: 6px; }
.st-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.st-status.dirty::before { background: #f59e0b; } .st-status.err::before { background: var(--bad); }
.st-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--st-line); background: var(--panel); color: var(--st-ink); padding: 7px 12px; border-radius: 9px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; }
.st-btn:hover { border-color: var(--st-mute); }
.st-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.st-btn.danger { color: var(--bad); }
.st-btn.ghost { background: transparent; }
.st-btn.sm { padding: 5px 9px; font-size: 12px; }
.st-btn.block { width: 100%; margin-top: 8px; }

.st-rail { grid-area: rail; background: var(--st-panel); border-right: 1px solid var(--st-line); display: flex; flex-direction: column; align-items: center; padding: 8px 0; gap: 2px; }
.st-rail button { width: 56px; border: 0; background: transparent; color: var(--st-mute); display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 9px 0; border-radius: 10px; cursor: pointer; font: inherit; font-size: 10.5px; font-weight: 600; }
.st-rail button:hover { color: var(--st-ink); background: var(--panel-2); }
.st-rail button.on { color: var(--accent); background: var(--accent-soft); }

.st-left, .st-right { background: var(--st-panel); overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: none; min-width: 0; }
.st-left::-webkit-scrollbar, .st-right::-webkit-scrollbar { display: none; }
.st-left *, .st-right * { min-width: 0; }
/* drag handles between the panels and the canvas */
.st-split { z-index: 6; width: 10px; cursor: col-resize; align-self: stretch; position: relative; touch-action: none; }
.st-split::after { content: ""; position: absolute; top: 0; bottom: 0; left: 4px; width: 2px; background: transparent; transition: background .15s; }
.st-split:hover::after, .st-split.on::after { background: var(--accent); }
.st-split-l { grid-area: left; justify-self: end; margin-right: -5px; }
.st-split-r { grid-area: right; justify-self: start; margin-left: -5px; }
.studio.st-resizing { cursor: col-resize; user-select: none; }
.studio.st-resizing .st-work { pointer-events: none; }
/* floating "more to scroll" hints */
.st-scrollhint { z-index: 7; justify-self: center; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--st-line); background: var(--panel); color: var(--st-ink);
  display: grid; place-items: center; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.18); opacity: .92; padding: 0; transition: transform .15s, opacity .15s; }
.st-scrollhint:hover { opacity: 1; transform: scale(1.08); }
.st-scrollhint[hidden] { display: none; }
.st-scrollhint.down { align-self: end; margin-bottom: 12px; animation: st-bob 2.2s ease-in-out infinite; }
.st-scrollhint.up { align-self: start; margin-top: 10px; }
.st-right ~ .st-scrollhint.up.st-hint-right { margin-top: 104px; }
.st-hint-left { grid-area: left; } .st-hint-right { grid-area: right; }
@keyframes st-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 3px; } }
.st-left { grid-area: left; border-right: 1px solid var(--st-line); padding: 14px; }
.st-right { grid-area: right; border-left: 1px solid var(--st-line); }
.st-panel-head { font-weight: 800; font-size: 15px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 2px; }
.st-panel-head small { font-weight: 500; font-size: 12px; color: var(--st-mute); }
.st-group-title { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--st-mute); margin: 16px 0 8px; }
.st-palette { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.st-palette button { border: 1px solid var(--st-line); background: var(--panel-2); color: var(--st-ink); border-radius: 10px; padding: 12px 4px 9px; display: flex; flex-direction: column; align-items: center; gap: 6px; font: inherit; font-size: 11.5px; font-weight: 600; cursor: grab; text-align: center; line-height: 1.15; transition: transform .12s, border-color .12s; }
.st-palette button:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.st-palette button:active { cursor: grabbing; }
.st-muted { color: var(--st-mute); font-size: 13px; }
.st-hint { font-size: 12px; color: var(--st-mute); display: flex; gap: 6px; align-items: flex-start; margin: 6px 0 0; line-height: 1.4; }
.st-hint svg { flex: none; margin-top: 1px; }
.st-upload { display: flex; align-items: center; justify-content: center; gap: 8px; border: 2px dashed var(--st-line); border-radius: 12px; padding: 14px; color: var(--st-mute); font-weight: 600; font-size: 13px; cursor: pointer; }
.st-upload:hover { border-color: var(--accent); color: var(--accent); }
.st-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.st-thumbs.big { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.st-thumb { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--panel-2); border: 1px solid var(--st-line); cursor: pointer; padding: 0; }
.st-thumb img, .st-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.st-thumb:hover { outline: 2px solid var(--accent); }
.st-thumb .st-badge { position: absolute; right: 4px; bottom: 4px; background: rgba(0,0,0,.6); color: #fff; border-radius: 6px; padding: 2px; display: flex; }
.st-thumb button { position: absolute; top: 3px; right: 3px; border: 0; background: rgba(0,0,0,.6); color: #fff; border-radius: 6px; padding: 3px; cursor: pointer; display: flex; }
.st-thumb.sel i { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; display: none; place-items: center; }
.st-thumb.sel:has(input:checked) { outline: 3px solid var(--accent); }
.st-thumb.sel:has(input:checked) i { display: grid; }
.st-picker { display: flex; flex-direction: column; }
.st-row-url { display: flex; gap: 8px; } .st-row-url input { flex: 1; }

.st-layers { display: flex; flex-direction: column; gap: 3px; }
.st-layer { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 8px; cursor: pointer; font-size: 13px; color: var(--st-ink); border: 1px solid transparent; }
.st-layer:hover { background: var(--panel-2); }
.st-layer.on { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.st-layer.hid { opacity: .5; }
.st-layer.over { border-top: 2px solid var(--accent); }
.st-layer-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-layer button { border: 0; background: transparent; color: var(--st-mute); cursor: pointer; padding: 3px; border-radius: 5px; display: flex; }
.st-layer button:hover { color: var(--st-ink); background: var(--panel); }

.st-themes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.st-theme { border: 1px solid var(--st-line); border-radius: 12px; padding: 10px; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 4px; transition: transform .12s; }
.st-theme:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.12); }
.st-theme b { font-size: 15px; line-height: 1.1; }
.st-theme small { font-size: 10.5px; }
.st-theme-sw { display: flex; gap: 3px; }
.st-theme-sw i { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(127,127,127,.3); }
.st-keys { display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.st-keys div { display: flex; justify-content: space-between; gap: 10px; }
.st-keys kbd, .st-ctx kbd { font: 600 11px Inter, sans-serif; background: var(--panel-2); border: 1px solid var(--st-line); border-bottom-width: 2px; border-radius: 6px; padding: 2px 6px; white-space: nowrap; color: var(--st-mute); }

/* workspace */
.st-work { grid-area: work; position: relative; overflow: hidden; }
.st-work.drop::after { content: "Loslaten om toe te voegen"; position: absolute; inset: 12px; border: 3px dashed var(--accent); border-radius: 16px; display: grid; place-items: center; color: var(--accent); font-weight: 700; background: color-mix(in srgb, var(--accent) 6%, transparent); pointer-events: none; }
.st-scroller { position: absolute; inset: 0; overflow: auto; display: grid; place-items: center; padding: 40px; }
.st-artboard { position: relative; flex: none; box-shadow: 0 0 0 1px rgba(0,0,0,.08), 0 20px 60px rgba(15,23,42,.25); background: #fff; }
.st-host { position: absolute; inset: 0; overflow: hidden; }
.st-host .dz-stage { cursor: default; }
.st-host .dz-el * { pointer-events: none; }
.st-host .dz-el { pointer-events: auto; cursor: move; }
.st-host .dz-el.st-editing, .st-host .dz-el.st-editing * { pointer-events: auto; cursor: text; }
.st-host .dz-el.st-editing [data-edit] { outline: 2px dashed var(--accent); outline-offset: 4px; }
.st-gridlayer { position: absolute; inset: 0; pointer-events: none; display: none; background-image: linear-gradient(rgba(255,37,103,.22) 1px, transparent 1px), linear-gradient(90deg, rgba(255,37,103,.22) 1px, transparent 1px); }
.st-gridlayer.on { display: block; }
.st-overlay { position: absolute; inset: 0; pointer-events: none; }
.st-sel { position: absolute; border: 2px solid var(--accent); box-sizing: border-box; pointer-events: auto; cursor: move; transform-origin: center; }
.st-sel.locked { border-style: dashed; cursor: default; }
.st-h { position: absolute; width: 12px; height: 12px; background: #fff; border: 2px solid var(--accent); border-radius: 3px; box-sizing: border-box; }
.st-h-nw { left: -7px; top: -7px; cursor: nwse-resize; } .st-h-se { right: -7px; bottom: -7px; cursor: nwse-resize; }
.st-h-ne { right: -7px; top: -7px; cursor: nesw-resize; } .st-h-sw { left: -7px; bottom: -7px; cursor: nesw-resize; }
.st-h-n { left: calc(50% - 6px); top: -7px; cursor: ns-resize; width: 16px; height: 8px; border-radius: 4px; } .st-h-s { left: calc(50% - 6px); bottom: -5px; cursor: ns-resize; width: 16px; height: 8px; border-radius: 4px; }
.st-h-e { top: calc(50% - 6px); right: -5px; cursor: ew-resize; width: 8px; height: 16px; border-radius: 4px; } .st-h-w { top: calc(50% - 6px); left: -5px; cursor: ew-resize; width: 8px; height: 16px; border-radius: 4px; }
.st-rot { position: absolute; left: calc(50% - 8px); top: -36px; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 2px solid var(--accent); cursor: grab; box-sizing: border-box; }
.st-rot::after { content: ""; position: absolute; left: 5px; top: 14px; width: 2px; height: 16px; background: var(--accent); }
.st-lockbadge { position: absolute; top: -12px; right: -12px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; }
.st-dim { position: absolute; display: flex; justify-content: center; pointer-events: none; font: 600 11px Inter, sans-serif; font-variant-numeric: tabular-nums; white-space: nowrap; }
.st-dim::after { content: none; }
.st-guide { position: absolute; background: #06b6d4; pointer-events: none; }
.st-guide.v { top: 0; bottom: 0; width: 1px; } .st-guide.h { left: 0; right: 0; height: 1px; }
.st-marquee { position: absolute; border: 1px solid var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.st-floatbar { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 2px; align-items: center; background: var(--st-panel); border: 1px solid var(--st-line); border-radius: 12px; padding: 4px; box-shadow: 0 10px 30px rgba(15,23,42,.15); z-index: 5; }
.st-floatbar button { width: 32px; height: 32px; border: 0; background: transparent; color: var(--st-ink); border-radius: 8px; display: grid; place-items: center; cursor: pointer; }
.st-floatbar button:hover { background: var(--panel-2); color: var(--accent); }
.st-floatbar span { width: 1px; height: 22px; background: var(--st-line); margin: 0 4px; }
.st-ctx { position: fixed; z-index: 60; min-width: 230px; background: var(--panel); border: 1px solid var(--st-line); border-radius: 12px; padding: 5px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.st-ctx button { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent; color: var(--st-ink); padding: 8px 10px; border-radius: 8px; font: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.st-ctx button span { flex: 1; }
.st-ctx button:hover { background: var(--accent-soft); color: var(--accent); }

/* inspector */
.st-insp-empty { padding: 40px 22px; text-align: center; color: var(--st-mute); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.st-insp-empty b { color: var(--st-ink); font-size: 15px; }
.st-insp-empty p { font-size: 13px; line-height: 1.45; margin: 0 0 8px; }
.st-insp-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--st-line); color: var(--accent); position: sticky; top: 0; background: var(--st-panel); z-index: 2; }
.st-elname { flex: 1; min-width: 0; border: 1px solid transparent; background: transparent; font-weight: 700; padding: 5px 6px; border-radius: 6px; color: var(--st-ink); }
.st-elname:hover, .st-elname:focus { border-color: var(--st-line); }
.st-tabs { display: flex; gap: 2px; padding: 8px 14px 0; border-bottom: 1px solid var(--st-line); position: sticky; top: 55px; background: var(--st-panel); z-index: 2; }
.st-tabs button { flex: 1; border: 0; background: transparent; color: var(--st-mute); padding: 9px 6px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; }
.st-tabs button.on { color: var(--accent); border-bottom-color: var(--accent); }
.st-fields { display: flex; flex-direction: column; gap: 12px; padding: 14px; }
.st-left .st-fields { padding: 0; }
.st-fields .st-group-title { margin: 8px 0 -4px; }
.st-f { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; color: var(--st-mute); }
.st-f > span:first-child { display: block; }
.st-f input:not([type=checkbox]):not([type=color]):not([type=range]), .st-f select, .st-f textarea, .st-fields > label > select { width: 100%; font-size: 13px; padding: 7px 9px; }
.st-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.st-check { flex-direction: row; display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--st-ink); font-weight: 500; }
.st-num { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); }
.st-num input { border: 0 !important; outline: none; flex: 1; min-width: 0; background: transparent; }
.st-num em { font-style: normal; font-size: 11px; color: var(--st-mute); padding-right: 9px; }
.st-range { display: flex; align-items: center; gap: 10px; }
.st-range input { flex: 1; accent-color: var(--accent); }
.st-range output { min-width: 36px; text-align: right; font-variant-numeric: tabular-nums; color: var(--st-ink); font-weight: 600; font-size: 12px; }
.st-seg { display: flex; background: var(--panel-2); border: 1px solid var(--st-line); border-radius: 9px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.st-seg button { flex: 1; border: 0; background: transparent; color: var(--st-mute); padding: 6px 8px; border-radius: 6px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 5px; white-space: nowrap; }
.st-seg button.on { background: var(--panel); color: var(--accent); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.st-toggle { display: flex; flex-direction: row; align-items: center; gap: 10px; font-size: 13px; color: var(--st-ink); cursor: pointer; font-weight: 500; }
.st-toggle input { display: none; }
.st-toggle i { width: 34px; height: 20px; border-radius: 99px; background: var(--st-line); position: relative; transition: background .2s; flex: none; }
.st-toggle i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.st-toggle input:checked + i { background: var(--accent); }
.st-toggle input:checked + i::after { transform: translateX(14px); }
.st-color { display: grid; grid-template-columns: 34px minmax(0, 1fr) 62px; gap: 6px; align-items: center; }
.st-alpha-num { display: flex; flex-direction: row; gap: 0; align-items: center; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); height: 34px; }
.st-alpha-num input { border: 0 !important; outline: none; width: 100%; min-width: 0; padding: 6px 2px 6px 8px !important; background: transparent; font-size: 12px !important; text-align: right; -moz-appearance: textfield; }
.st-alpha-num input::-webkit-inner-spin-button { display: none; }
.st-alpha-num em { font-style: normal; font-size: 11px; color: var(--st-mute); padding-right: 7px; }
.st-color-row2 { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; }
.st-color.no-color .st-alpha, .st-color.no-color .st-alpha-num { opacity: .4; pointer-events: none; }
input.st-alpha { flex: 1; min-width: 40px; height: 10px; -webkit-appearance: none; appearance: none; border-radius: 99px; border: 1px solid var(--st-line); padding: 0 !important;
  background: linear-gradient(90deg, transparent, var(--ac, #000)), repeating-conic-gradient(#d4d7dd 0 25%, #fff 0 50%) 50% / 10px 10px; }
input.st-alpha::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 2px solid #334155; box-shadow: 0 1px 3px rgba(0,0,0,.3); cursor: pointer; }
input.st-alpha::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2px solid #334155; cursor: pointer; }
/* collapsible inspector sections */
.st-sec { border-bottom: 1px solid var(--st-line); }
.st-fields > .st-sec:first-child, .st-fields > .st-sec-flat + .st-sec { border-top: 1px solid var(--st-line); }
.st-sec > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 0; cursor: pointer; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--st-mute); user-select: none; }
.st-sec > summary::-webkit-details-marker { display: none; }
.st-sec > summary:hover { color: var(--st-ink); }
.st-sec > summary svg { transition: transform .2s; }
.st-sec:not([open]) > summary svg { transform: rotate(-90deg); }
.st-sec-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 8px; padding-bottom: 14px; }
.st-sec-body > * { grid-column: 1 / -1; }
.st-sec-body > .st-half { grid-column: auto; }
.st-sec-flat { padding-bottom: 4px; }
#st-insp-body { gap: 0; padding-top: 4px; }
#st-insp-body > .st-sec-flat { padding-bottom: 14px; }
.st-scaletext { margin-top: 10px; }
.st-syncbox { display: flex; flex-direction: column; gap: 6px; }
.st-note { margin: 0; font-size: 12px; line-height: 1.4; color: var(--st-mute); font-weight: 500; }
.st-seg button { min-width: 0; }

.st-swatch { width: 36px; height: 34px; padding: 0 !important; border-radius: 8px; border: 1px solid var(--st-line); position: relative; overflow: hidden; }
.st-swatch.empty { background: repeating-conic-gradient(#e5e7eb 0 25%, #fff 0 50%) 50% / 12px 12px !important; }
.st-swatch:not(.empty) { background: repeating-conic-gradient(#d4d7dd 0 25%, #fff 0 50%) 50% / 10px 10px; }
.st-swatch i { position: absolute; inset: 0; }
.st-swatch input { position: absolute; inset: -8px; width: calc(100% + 16px); height: calc(100% + 16px); opacity: 0; cursor: pointer; }
.st-color input[type=text] { font-family: ui-monospace, monospace; font-size: 12px !important; }
.st-tokens { display: flex; gap: 4px; flex: none; flex-wrap: wrap; }
.st-tokens button { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--panel); box-shadow: 0 0 0 1px var(--st-line); cursor: pointer; padding: 0; }
.st-tokens button.on { box-shadow: 0 0 0 2px var(--accent); }
.st-tokens .st-tok-clear { background: var(--panel-2); color: var(--st-mute); display: grid; place-items: center; }
.st-icongrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; max-height: 220px; overflow: auto; }
.st-icongrid button { aspect-ratio: 1; border: 1px solid var(--st-line); background: var(--panel-2); color: var(--st-ink); border-radius: 7px; display: grid; place-items: center; cursor: pointer; padding: 0; }
.st-icongrid button.on, .st-icongrid button:hover { border-color: var(--accent); color: var(--accent); }
.st-mediafield { display: flex; gap: 10px; align-items: center; }
.st-mf-prev { width: 84px; height: 64px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--st-line); display: grid; place-items: center; color: var(--st-mute); overflow: hidden; flex: none; }
.st-mf-prev img, .st-mf-prev video { width: 100%; height: 100%; object-fit: cover; }
.st-mf-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.st-geo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.st-geo-grid label { display: flex; flex-direction: row; align-items: center; border: 1px solid var(--border); border-radius: 8px; padding-left: 9px; gap: 4px; background: var(--panel); }
.st-geo-grid label span { font-size: 11px; font-weight: 700; color: var(--st-mute); width: 12px; display: flex; }
.st-geo-grid input { border: 0 !important; flex: 1; min-width: 0; padding: 6px 4px !important; font-size: 13px; background: transparent; outline: none; }
.st-geo-grid .st-op { grid-column: span 1; padding-right: 8px; }
.st-geo-grid .st-op input { accent-color: var(--accent); }
.st-anim-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.st-anim-grid button { border: 1px solid var(--st-line); background: var(--panel-2); color: var(--st-ink); border-radius: 9px; padding: 10px 4px 8px; font: inherit; font-size: 11.5px; font-weight: 600; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.st-anim-grid button.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.st-anim-demo { width: 22px; height: 16px; border-radius: 4px; background: currentColor; opacity: .7; }
.st-anim-grid button:hover .fx-demo-fade { animation: dzFade 1s infinite; } .st-anim-grid button:hover .fx-demo-up { animation: dzUp 1s infinite; }
.st-anim-grid button:hover .fx-demo-down { animation: dzDown 1s infinite; } .st-anim-grid button:hover .fx-demo-left { animation: dzLeft 1s infinite; }
.st-anim-grid button:hover .fx-demo-right { animation: dzRight 1s infinite; } .st-anim-grid button:hover .fx-demo-zoom { animation: dzZoom 1s infinite; }
.st-anim-grid button:hover .fx-demo-pop { animation: dzPop 1s infinite; } .st-anim-grid button:hover .fx-demo-blur { animation: dzBlur 1s infinite; }
.st-anim-grid button:hover .fx-demo-flip { animation: dzFlip 1s infinite; } .st-anim-grid button:hover .fx-demo-wipe { animation: dzWipe 1s infinite; }
.fx-demo-none { opacity: .25 !important; }
.st-source { display: flex; flex-direction: column; gap: 8px; }
.st-tierlabels { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* list editors */
.st-items { display: flex; flex-direction: column; gap: 6px; }
.st-irow { display: flex; gap: 6px; align-items: flex-start; padding: 8px 6px; border: 1px solid var(--st-line); border-radius: 10px; background: var(--panel-2); }
.st-irow.over { border-color: var(--accent); }
.st-grip { cursor: grab; color: var(--st-mute); padding-top: 6px; display: flex; }
.st-irow-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.st-irow-main, .st-irow-more { display: flex; gap: 5px; }
.st-irow input, .st-irow select { font-size: 12.5px !important; padding: 5px 7px !important; min-width: 0; flex: 1; }
.st-irow input.price { flex: 0 0 64px; text-align: right; }
.st-irow-more input { color: var(--st-mute); }
.st-irow-opts { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 4px; font-size: 11px; color: var(--st-mute); }
.st-irow-opts select { flex: 1; min-width: 0; padding: 3px 4px; font-size: 11px; }
.st-irow-opts label { display: flex; flex-direction: row; align-items: center; gap: 4px; flex: none; min-width: 0; margin: 0; white-space: nowrap; }
.st-irow-opts input { width: 58px; flex: none; min-width: 0; padding: 3px 5px; }
.st-irow-opts em { font-style: normal; }
.st-irow-tags { display: flex; gap: 3px; align-items: center; flex-wrap: wrap; }
.st-irow-tags button { border: 1px solid var(--st-line); background: var(--panel); color: var(--st-mute); border-radius: 6px; padding: 3px 5px; cursor: pointer; display: inline-flex; align-items: center; font: inherit; font-size: 10.5px; font-weight: 600; }
.st-irow-tags button.on { color: #fff; background: var(--tc, var(--accent)); border-color: transparent; }
.st-irow-tags .flag.on { background: var(--accent); color: #fff; }
.st-flex { flex: 1; }
.st-irow-rm { border: 0; background: transparent; color: var(--st-mute); cursor: pointer; padding: 5px; border-radius: 6px; display: flex; }
.st-irow-rm:hover { color: var(--bad); background: var(--panel); }
.st-items-bar { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.st-logo-pick { width: 46px; height: 32px; flex: none; border: 1px dashed var(--st-line); border-radius: 6px; background: #fff; display: grid; place-items: center; cursor: pointer; color: var(--st-mute); padding: 2px; }
.st-logo-pick { overflow: hidden; }
.st-logo-pick img { width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; }
.st-irow-main select { flex: 0 0 80px; }
.st-dirs { display: flex; gap: 3px; }
.st-dirs button { border: 1px solid var(--st-line); background: var(--panel); color: var(--st-mute); border-radius: 6px; padding: 4px; cursor: pointer; display: flex; }
.st-dirs button.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.st-grid-ed { display: flex; flex-direction: column; gap: 6px; }
.st-grid-scroll { overflow-x: auto; border: 1px solid var(--st-line); border-radius: 10px; }
.st-grid-ed table { border-collapse: collapse; width: 100%; }
.st-grid-ed th { font-size: 11px; text-align: left; padding: 6px 8px; color: var(--st-mute); background: var(--panel-2); }
.st-grid-ed td { padding: 0; border-top: 1px solid var(--st-line); }
.st-grid-ed td + td { border-left: 1px solid var(--st-line); }
.st-grid-ed input { border: 0 !important; border-radius: 0 !important; width: 100%; min-width: 80px; font-size: 12.5px !important; padding: 7px 8px !important; background: transparent; }
.st-grid-ed td:last-child { width: 28px; }
.st-grid-ed td button { border: 0; background: transparent; color: var(--st-mute); cursor: pointer; padding: 6px; display: flex; }

/* preview */
.st-preview { position: fixed; inset: 0; z-index: 100; background: #000; }
.st-preview-host { position: absolute; inset: 0; }
.st-preview-host .dz-stage { cursor: none; }
.st-preview-bar { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; opacity: 0; transition: opacity .3s; }
.st-preview:hover .st-preview-bar { opacity: 1; }

@media (max-width: 1100px) {
  .studio { grid-template-columns: 56px var(--st-lw, 240px) 1fr var(--st-rw, 290px); }
  .st-name { width: 160px; }
}
.st-dim span { background: var(--accent); color: #fff; padding: 3px 7px; border-radius: 6px; box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.st-narrow { display: none; }
@media (max-width: 1000px) {
  .studio { grid-template-columns: 52px 0 1fr 0; }
  .st-left, .st-right, .st-split, .st-scrollhint { display: none !important; }
  .st-narrow { display: flex; align-items: center; gap: 8px; position: fixed; left: 64px; right: 12px; bottom: 12px; z-index: 30; background: var(--text); color: var(--bg); padding: 10px 14px; border-radius: 10px; font-size: 13px; font-weight: 600; }
  .st-top .st-size, .st-top .st-sep, #st-snap, #st-grid { display: none; }
  .st-name { width: 120px; }
}
.st-irow-opts label:has(select) { flex: 1 1 100%; }
