/* Jeere Studio — the advanced editor's chrome (dark, Figma-like), over the light store canvas.
 * Everything is scoped under .st / the studio's own ids; the stores in the artboards keep
 * ../creer/store.css (.jst). Platform UI: Inter on a strict 11 / 12 / 13 / 15 (18 for dialog
 * titles) scale, Poppins for the brand mark only, no underlines, colour only where it means
 * something (the status tokens below) — plus the brand blue #3657FF for selection, like Figma.
 * Motion: one token set (--dur-1 / --dur-2 / --ease), off under prefers-reduced-motion. */

:root {
  --st-chrome: #1E1E1E;      /* top bar + panels */
  --st-chrome-2: #2C2C2C;    /* raised rows, inputs */
  --st-chrome-3: #383838;    /* hover */
  --st-line-d: #3D3D3D;
  --st-ink: #E8E8E8;
  --st-ink-dim: #9E9E9E;
  --st-blue: #3657FF;        /* selection + primary, like the brand chart blue */
  --st-blue-soft: rgba(84, 118, 255, 0.55);
  --st-canvas: #F0F0F0;
  --st-dot: #D9D9D9;
  --ok: #22C55E; --ok-bg: #DCFCE7; --ok-ink: #166534;
  --warn: #F5B800; --warn-bg: #FEF6D3; --warn-ink: #7A5A00;
  --err: #EF4444; --err-bg: #FDE8E8; --err-ink: #B91C1C;
  --info: #3B82F6; --info-bg: #E6F0FF; --info-ink: #1D4ED8;
  --st-font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --st-brand-font: 'Poppins', 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; font-family: var(--st-font); font-size: 13px; color: var(--st-ink);
  background: var(--st-chrome); overflow: hidden;
}
.st a { text-decoration: none; }
.st button { font-family: inherit; }
.st-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
kbd {
  font-family: inherit; font-size: 11px; color: var(--st-ink-dim);
  border: 1px solid var(--st-line-d); border-radius: 4px; padding: 1px 5px; background: var(--st-chrome-2);
  white-space: nowrap;
}

.st { display: flex; flex-direction: column; height: 100vh; }

/* ------------------------------------------------------------------ top bar */

.st-top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: 48px; padding: 0 10px; background: var(--st-chrome);
  border-bottom: 1px solid #111; flex: none; z-index: 40; position: relative;
}
.st-top__left, .st-top__center, .st-top__right { display: flex; align-items: center; gap: 8px; min-width: 0; }
.st-top__left { flex: 1 1 0; }
.st-top__right { flex: 1 1 0; justify-content: flex-end; }

.st-logo { display: flex; align-items: center; color: var(--st-ink); padding: 4px; border-radius: 6px; }
.st-logo:hover { background: var(--st-chrome-3); }
.st-logo svg { height: 26px; width: auto; aspect-ratio: 600 / 446; fill: currentColor; display: block; }
.st-brand { font-weight: 600; letter-spacing: 0.01em; }
.st-badge {
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: #DDE8FF; background: rgba(54, 87, 255, 0.28); border: 1px solid rgba(94, 125, 255, 0.5);
  padding: 2px 8px; border-radius: 999px; white-space: nowrap;
}
.st-sep { width: 1px; height: 20px; background: var(--st-line-d); margin: 0 2px; flex: none; }
.st-name {
  background: transparent; border: 1px solid transparent; border-radius: 6px; color: var(--st-ink);
  font: 500 13px var(--st-font); padding: 5px 8px; min-width: 60px; max-width: 220px; width: 100%;
}
.st-name:hover { border-color: var(--st-line-d); }
.st-name:focus { outline: none; border-color: var(--st-blue); background: var(--st-chrome-2); }

.st-tools, .st-devices { display: flex; gap: 2px; background: var(--st-chrome-2); border-radius: 8px; padding: 2px; }
.st-tool, .st-devices button {
  display: flex; align-items: center; justify-content: center; width: 32px; height: 28px;
  background: transparent; border: 0; border-radius: 6px; color: var(--st-ink-dim); cursor: pointer;
}
.st-tool svg, .st-devices svg { width: 17px; height: 17px; }
.st-tool:hover, .st-devices button:hover { color: var(--st-ink); background: var(--st-chrome-3); }
.st-tool.is-on, .st-devices button.is-on { background: var(--st-blue); color: #fff; }

.st-zoomwrap { position: relative; }
.st-zoombtn {
  display: flex; align-items: center; gap: 5px; background: transparent; border: 0; color: var(--st-ink);
  font: 500 12px var(--st-font); padding: 6px 8px; border-radius: 6px; cursor: pointer; min-width: 74px; justify-content: center;
}
.st-zoombtn:hover { background: var(--st-chrome-3); }
.st-caret { width: 12px; height: 12px; color: var(--st-ink-dim); }
.st-menu {
  position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  background: #262626; border: 1px solid var(--st-line-d); border-radius: 10px; padding: 6px;
  min-width: 210px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45); z-index: 60;
}
.st-menu button {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; width: 100%;
  background: transparent; border: 0; color: var(--st-ink); font: 400 12px var(--st-font);
  padding: 7px 9px; border-radius: 6px; cursor: pointer; text-align: left;
}
.st-menu button:hover { background: var(--st-blue); color: #fff; }
.st-menu button:hover kbd { color: rgba(255, 255, 255, 0.8); border-color: transparent; background: rgba(255, 255, 255, 0.14); }
.st-menu hr { border: 0; border-top: 1px solid var(--st-line-d); margin: 5px 2px; }
/* the right-click context menu reuses .st-menu, fixed at the pointer */
.st-ctx { position: fixed; left: auto; top: auto; transform: none; z-index: 110; min-width: 190px; }

.st-save { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--st-ink-dim); white-space: nowrap; }
.st-save__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex: none; }
.st-save[data-state="saving"] .st-save__dot { background: var(--st-ink-dim); }
.st-save[data-state="error"] .st-save__dot { background: var(--err); }
.st-save[data-state="error"] { color: #FFB3B3; }

.st-ghostbtn {
  background: transparent; border: 1px solid var(--st-line-d); color: var(--st-ink);
  font: 500 12px var(--st-font); padding: 6px 12px; border-radius: 7px; cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center;
}
.st-ghostbtn:hover { background: var(--st-chrome-3); }
.st-primary {
  background: var(--st-blue); border: 1px solid var(--st-blue); color: #fff;
  font: 600 12px var(--st-font); padding: 6px 14px; border-radius: 7px; cursor: pointer; white-space: nowrap;
}
.st-primary:hover { filter: brightness(1.12); }
.st-helpbtn {
  width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--st-line-d);
  background: transparent; color: var(--st-ink-dim); font: 600 13px var(--st-font); cursor: pointer;
}
.st-helpbtn:hover { color: var(--st-ink); background: var(--st-chrome-3); }

/* ------------------------------------------------------------------ body layout */

.st-body { display: flex; flex: 1 1 auto; min-height: 0; }
.st-left, .st-right {
  width: 260px; flex: none; background: var(--st-chrome); display: flex; flex-direction: column; min-height: 0;
  z-index: 30; position: relative;
}
.st-left { border-right: 1px solid #111; }
.st-right { width: 280px; border-left: 1px solid #111; }
.st-panel { overflow-y: auto; overflow-x: hidden; flex: 1 1 auto; padding: 8px; scrollbar-width: thin; scrollbar-color: #4a4a4a transparent; }

.st-left__tabs { display: flex; border-bottom: 1px solid var(--st-line-d); flex: none; }
.st-left__tabs button {
  flex: 1; background: transparent; border: 0; color: var(--st-ink-dim); font: 500 12px var(--st-font);
  padding: 10px 0; cursor: pointer; border-bottom: 2px solid transparent;
}
.st-left__tabs button.is-on { color: var(--st-ink); border-bottom-color: var(--st-blue); }
.st-left__tabs button:hover { color: var(--st-ink); }

.st-right__head {
  display: flex; align-items: baseline; gap: 8px; padding: 11px 14px; border-bottom: 1px solid var(--st-line-d);
  font-weight: 600; font-size: 13px; flex: none;
}
.st-right__sub { font-weight: 400; font-size: 11px; color: var(--st-ink-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ------------------------------------------------------------------ layers tree */

.st-group { margin-bottom: 4px; }
.st-group__title {
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--st-ink-dim);
  padding: 8px 8px 4px;
}
.st-row {
  display: flex; align-items: center; gap: 6px; padding: 0 6px; height: 30px; border-radius: 6px;
  color: var(--st-ink); cursor: default; user-select: none; position: relative;
}
.st-row:hover { background: var(--st-chrome-2); }
.st-row:focus-visible { outline: 2px solid var(--st-blue); outline-offset: -2px; background: var(--st-chrome-2); }
.st-row.is-sel { background: rgba(54, 87, 255, 0.32); }
.st-row.is-sel:hover { background: rgba(54, 87, 255, 0.42); }
.st-row.is-page.is-on { background: var(--st-chrome-2); box-shadow: inset 2px 0 0 var(--st-blue); }
.st-row.is-off .st-row__name, .st-row.is-off .st-row__icon { opacity: 0.45; }
.st-row.is-dragging { opacity: 0.35; }
.st-row__icon { width: 16px; height: 16px; flex: none; color: var(--st-ink-dim); }
.st-row__icon svg { width: 16px; height: 16px; display: block; }
.st-row__dot { width: 9px; height: 9px; border-radius: 3px; flex: none; border: 1px solid rgba(255,255,255,0.25); }
.st-row__name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.st-row__name input {
  width: 100%; background: var(--st-chrome-2); color: var(--st-ink); border: 1px solid var(--st-blue);
  border-radius: 4px; font: 400 12px var(--st-font); padding: 2px 5px;
}
.st-row__name input:focus { outline: none; }
.st-row__btn {
  width: 22px; height: 22px; display: none; align-items: center; justify-content: center; flex: none;
  background: transparent; border: 0; border-radius: 5px; color: var(--st-ink-dim); cursor: pointer; padding: 0;
}
.st-row__btn svg { width: 14px; height: 14px; }
.st-row:hover .st-row__btn, .st-row__btn.is-active { display: flex; }
.st-row__btn:hover { color: var(--st-ink); background: var(--st-chrome-3); }
.st-row__btn.is-active { color: var(--st-ink); }
.st-row--child { margin-left: 22px; height: 27px; }
.st-row--child .st-row__name { font-size: 12px; }
.st-tree__dropline { position: absolute; left: 8px; right: 8px; height: 0; border-top: 2px solid var(--st-blue); z-index: 5; pointer-events: none; }
.st-tree__dropline::before {
  content: ''; position: absolute; left: -4px; top: -4px; width: 6px; height: 6px; border: 2px solid var(--st-blue);
  border-radius: 50%; background: var(--st-chrome);
}
.st-tree__empty { color: var(--st-ink-dim); font-size: 12px; padding: 10px 8px; }

/* ------------------------------------------------------------------ insert panel */

.st-insert__hint { color: var(--st-ink-dim); font-size: 12px; padding: 6px 8px 10px; line-height: 1.5; }
.st-insert__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 4px; }
.st-typecard {
  background: var(--st-chrome-2); border: 1px solid transparent; border-radius: 10px; padding: 10px 8px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: grab; user-select: none; text-align: center;
}
.st-typecard:hover { border-color: var(--st-blue-soft); background: var(--st-chrome-3); }
.st-typecard:active { cursor: grabbing; }
.st-typecard svg { width: 44px; height: 32px; color: var(--st-ink-dim); }
.st-typecard:hover svg { color: var(--st-ink); }
.st-typecard b { font-weight: 500; font-size: 12px; }
.st-prevcard {
  position: fixed; z-index: 80; width: 230px; background: #262626; border: 1px solid var(--st-line-d);
  border-radius: 10px; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5); padding: 10px; pointer-events: none;
}
.st-prevcard__shot { width: 210px; height: 150px; overflow: hidden; border-radius: 6px; background: #fff; position: relative; }
.st-prevcard__shot > .jst { position: absolute; top: 0; left: 0; width: 390px; transform: scale(0.538); transform-origin: 0 0; pointer-events: none; }
.st-prevcard p { margin: 8px 0 0; font-size: 11px; line-height: 1.45; color: var(--st-ink-dim); }

/* ------------------------------------------------------------------ canvas / stage */

.st-stage {
  flex: 1 1 auto; position: relative; overflow: hidden; outline: none;
  background-color: var(--st-canvas);
  background-image: radial-gradient(var(--st-dot) 1px, transparent 1.3px);
  background-size: 24px 24px;
  cursor: default; touch-action: none;
}
.st-stage.is-hand { cursor: grab; }
.st-stage.is-panning { cursor: grabbing; }
.st-world { position: absolute; top: 0; left: 0; width: 0; height: 0; transform-origin: 0 0; }
.st-ab { position: absolute; }
.st-ab.is-hidden { display: none; }
.st-ab__name {
  position: absolute; bottom: 100%; left: 0; padding-bottom: calc(6px * min(var(--inv, 1), 4));
  /* the inverse scale is capped and the label clipped to its own artboard: at low zoom the two
   * names no longer collide into one string. #5C5C5C / #767676 read at >= 4.5:1 on the canvas. */
  font: 500 calc(12px * min(var(--inv, 1), 4)) var(--st-font); color: #5C5C5C; white-space: nowrap;
  transform-origin: 0 100%; user-select: none;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}
.st-ab__name span { color: #6A6A6A; }
.st-ab__frame {
  background: #fff; box-shadow: 0 0 0 calc(1px * var(--inv, 1)) rgba(0, 0, 0, 0.1), 0 10px 40px rgba(0, 0, 0, 0.12);
  min-height: 200px;
}
.st-ab__root { min-height: 200px; }
.st-ab__err {
  padding: 48px 24px; font: 500 15px var(--st-font); color: #B91C1C; background: #FDE8E8;
  text-align: center; line-height: 1.5;
}
.st-ab__err small { display: block; margin-top: 8px; font-weight: 400; color: #7A3030; }

/* Selection + hover decor inside the artboards (over store.css, additive only). The name tag is
 * NOT drawn here: .jst clips its overflow, so a ::before on the store node vanished on the first
 * section and covered the one above elsewhere. It lives on .st-ab__tag, a studio-owned element
 * in the artboard layer, positioned by positionTags(). */
.st-ab .st-hov { outline: none; }
.st-ab .st-sel { outline: none; }
.st-ab__tag {
  position: absolute; z-index: 60;
  transform: translateY(-100%) scale(var(--inv, 1)); transform-origin: 0 100%;
  background: var(--st-blue); color: #fff; font: 500 11px/1 var(--st-font);
  padding: 4px 8px 3px; border-radius: 4px 4px 4px 0; white-space: nowrap; pointer-events: none;
}
.st-ab .st-sel--sub, .st-ab .st-lockhint { outline: none; }

.st-dropline { position: absolute; z-index: 45; height: 0; border-top: 3px solid var(--st-blue); pointer-events: none; border-radius: 2px; }
.st-dropline::before, .st-dropline::after {
  content: ''; position: absolute; top: -6px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--st-blue); box-shadow: 0 0 0 2px #fff;
}
.st-dropline::before { left: -4px; }
.st-dropline::after { right: -4px; }
.st-ghostchip {
  position: fixed; z-index: 90; pointer-events: none; background: var(--st-blue); color: #fff;
  font: 500 12px var(--st-font); padding: 6px 12px; border-radius: 8px; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  transform: translate(-50%, -130%); white-space: nowrap;
}

/* ------------------------------------------------------------------ inspector */

.st-insp__group { border-bottom: 1px solid var(--st-line-d); }
.st-insp__head {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  background: transparent; border: 0; color: var(--st-ink); font: 600 12px var(--st-font);
  padding: 11px 8px; cursor: pointer;
}
.st-insp__head .st-caret { transition: transform 0.15s; }
.st-insp__group.is-closed .st-caret { transform: rotate(-90deg); }
.st-insp__group.is-closed .st-insp__body { display: none; }
.st-insp__body { padding: 0 8px 14px; display: flex; flex-direction: column; gap: 10px; }
.st-insp__empty { color: var(--st-ink-dim); font-size: 12px; line-height: 1.55; padding: 14px 10px; }

.st-field { display: flex; flex-direction: column; gap: 4px; }
.st-field > label { font-size: 11px; color: var(--st-ink-dim); display: flex; justify-content: space-between; align-items: center; }
.st-field input[type="text"], .st-field input[type="number"], .st-field textarea, .st-field select {
  width: 100%; background: var(--st-chrome-2); border: 1px solid transparent; border-radius: 7px;
  color: var(--st-ink); font: 400 12px var(--st-font); padding: 7px 9px;
}
.st-field input:hover, .st-field textarea:hover, .st-field select:hover { border-color: var(--st-line-d); }
.st-field input:focus, .st-field textarea:focus, .st-field select:focus { outline: none; border-color: var(--st-blue); }
.st-field textarea { resize: vertical; min-height: 64px; line-height: 1.5; }
.st-field select { appearance: none; cursor: pointer; }
.st-selectwrap { position: relative; }
.st-selectwrap::after {
  content: ''; position: absolute; right: 10px; top: 50%; width: 7px; height: 7px; pointer-events: none;
  border-right: 1.6px solid var(--st-ink-dim); border-bottom: 1.6px solid var(--st-ink-dim); transform: translateY(-70%) rotate(45deg);
}
.st-num { display: flex; align-items: stretch; gap: 0; }
.st-num__drag {
  display: flex; align-items: center; justify-content: center; width: 26px; flex: none; cursor: ew-resize;
  background: var(--st-chrome-2); border-radius: 7px 0 0 7px; color: var(--st-ink-dim); border-right: 1px solid var(--st-chrome);
  user-select: none; touch-action: none;
}
.st-num__drag:hover { color: var(--st-ink); background: var(--st-chrome-3); }
.st-num__drag svg { width: 12px; height: 12px; }
.st-num input { border-radius: 0 7px 7px 0 !important; }
.st-count { font-size: 11px; color: var(--st-ink-dim); }
.st-count.is-over { color: #FFB3B3; }

.st-check { display: flex; align-items: center; gap: 8px; font-size: 12px; cursor: pointer; padding: 2px 0; }
.st-check input { accent-color: var(--st-blue); width: 14px; height: 14px; }

.st-swatches { display: flex; flex-wrap: wrap; gap: 7px; }
.st-swatch {
  width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}
.st-swatch.is-on { border-color: #fff; box-shadow: 0 0 0 2px var(--st-blue); }
.st-seg { display: flex; background: var(--st-chrome-2); border-radius: 8px; padding: 2px; gap: 2px; }
.st-seg button {
  flex: 1; background: transparent; border: 0; border-radius: 6px; color: var(--st-ink-dim);
  font: 500 12px var(--st-font); padding: 6px 4px; cursor: pointer; white-space: nowrap;
}
.st-seg button:hover { color: var(--st-ink); }
.st-seg button.is-on { background: var(--st-blue); color: #fff; }
.st-tplcards { display: flex; flex-direction: column; gap: 6px; }
.st-tplcard {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px; background: var(--st-chrome-2);
  border: 1px solid transparent; border-radius: 8px; padding: 8px 10px; cursor: pointer; color: var(--st-ink); text-align: left;
}
.st-tplcard:hover { background: var(--st-chrome-3); }
.st-tplcard.is-on { border-color: var(--st-blue); }
.st-tplcard b { font-size: 12px; font-weight: 600; }
.st-tplcard span { font-size: 11px; color: var(--st-ink-dim); }

.st-items { display: flex; flex-direction: column; gap: 8px; }
.st-item { background: var(--st-chrome-2); border-radius: 8px; padding: 8px; display: flex; flex-direction: column; gap: 8px; }
.st-item__head { display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: var(--st-ink-dim); }
.st-item__del { background: transparent; border: 0; color: var(--st-ink-dim); cursor: pointer; font-size: 15px; padding: 0 4px; border-radius: 4px; }
.st-item__del:hover { color: #FFB3B3; background: rgba(239, 68, 68, 0.14); }
.st-item .st-field input, .st-item .st-field textarea, .st-item .st-field select { background: var(--st-chrome-3); }
.st-addbtn {
  background: transparent; border: 1px dashed var(--st-line-d); color: var(--st-ink-dim); border-radius: 7px;
  font: 500 12px var(--st-font); padding: 7px; cursor: pointer; width: 100%;
}
.st-addbtn:hover { color: var(--st-ink); border-color: var(--st-ink-dim); }
.st-addbtn:disabled { opacity: 0.4; cursor: default; }

.st-imgfield { display: flex; flex-direction: column; gap: 6px; }
.st-imgfield__prev { width: 100%; height: 110px; border-radius: 8px; background: var(--st-chrome-2); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.st-imgfield__prev img { width: 100%; height: 100%; object-fit: cover; display: block; }
.st-imgfield__prev span { color: var(--st-ink-dim); font-size: 11px; }
.st-imgfield__row { display: flex; gap: 6px; }
.st-imgfield__row .st-ghostbtn { flex: 1; justify-content: center; font-size: 12px; padding: 6px 8px; }
.st-imgfield__crop { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; margin-top: 6px; font-size: 12px; padding: 6px 8px; }
.st-credit { font-size: 11px; color: var(--st-ink-dim); line-height: 1.45; }
.st-credit a { color: var(--st-ink-dim); border-bottom: 1px solid var(--st-line-d); }
.st-credit a:hover { color: var(--st-ink); }

.st-danger {
  background: rgba(239, 68, 68, 0.12); border: 1px solid rgba(239, 68, 68, 0.4); color: #FFB3B3;
  border-radius: 7px; font: 500 12px var(--st-font); padding: 7px; cursor: pointer; width: 100%;
}
.st-danger:hover { background: rgba(239, 68, 68, 0.22); }

/* ------------------------------------------------------------------ modals, toasts, help */

.st-modal {
  position: fixed; inset: 0; z-index: 100; background: rgba(12, 12, 12, 0.6); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.st-modal__card {
  background: #262626; border: 1px solid var(--st-line-d); border-radius: 14px; padding: 26px;
  width: min(480px, 100%); max-height: 86vh; overflow: auto; position: relative;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55);
}
.st-modal__card h2 { margin: 10px 0 10px; font-size: 18px; font-weight: 600; }
.st-modal__card p { margin: 0 0 10px; font-size: 13px; line-height: 1.6; color: #C8C8C8; }
.st-modal__note { font-size: 12px !important; color: var(--st-ink-dim) !important; }
.st-modal__cloud { height: 44px; width: auto; aspect-ratio: 600 / 446; fill: var(--st-ink); display: block; margin-bottom: 12px; }
.st-modal__actions { display: flex; gap: 10px; margin-top: 18px; align-items: center; }
.st-modal__close {
  position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 8px;
  background: transparent; border: 0; color: var(--st-ink-dim); font-size: 18px; cursor: pointer;
}
.st-modal__close:hover { background: var(--st-chrome-3); color: var(--st-ink); }
.st-modal__card--help { width: min(720px, 100%); }
.st-help__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 28px; margin-top: 14px; }
.st-help__group h3 {
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--st-ink-dim); margin: 14px 0 6px;
}
.st-help__row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 4px 0; font-size: 12px; }
.st-help__keys { display: flex; gap: 3px; flex: none; }

.st-share__addr {
  display: flex; align-items: center; gap: 8px; background: var(--st-chrome-2); border-radius: 8px;
  padding: 9px 12px; font-size: 12px; margin: 10px 0; justify-content: space-between;
}
.st-share__addr code { font-family: ui-monospace, monospace; font-size: 12px; color: var(--st-ink); }
.st-share__score { display: flex; align-items: center; gap: 10px; margin: 6px 0 12px; }
.st-pill { font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.st-pill--ok { background: var(--ok-bg); color: var(--ok-ink); }
.st-pill--err { background: var(--err-bg); color: var(--err-ink); }
.st-share__issues { margin: 0 0 6px; padding: 0 0 0 18px; font-size: 12px; color: #C8C8C8; line-height: 1.7; }
.st-share__row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

.st-toasts {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 120;
  display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none;
}
.st-toast {
  background: #262626; border: 1px solid var(--st-line-d); color: var(--st-ink);
  font: 500 12px var(--st-font); padding: 9px 16px; border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45); display: flex; align-items: center; gap: 8px;
  animation: st-toast-in 0.18s ease-out;
}
.st-toast::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--st-ink-dim); flex: none; }
.st-toast[data-tone="ok"]::before { background: var(--ok); }
.st-toast[data-tone="warn"]::before { background: var(--warn); }
.st-toast[data-tone="err"]::before { background: var(--err); }
.st-toast[data-tone="info"]::before { background: var(--info); }
@keyframes st-toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------------ small screens */

.st-guard { display: none; }
@media (max-width: 1023px) {
  .st { display: none; }
  body { overflow: auto; }
  .st-guard {
    display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 24px;
    background: var(--st-chrome);
  }
  .st-guard__card { max-width: 420px; text-align: center; }
  .st-guard__cloud { height: 54px; width: auto; aspect-ratio: 600 / 446; fill: var(--st-ink); margin-bottom: 18px; }
  .st-guard__card h1 { font-size: 18px; font-weight: 600; margin: 0 0 12px; }
  .st-guard__card p { font-size: 13px; line-height: 1.65; color: #C8C8C8; margin: 0 0 22px; }
  .st-guard__btn {
    display: inline-block; background: #fff; color: #111; font: 600 13px var(--st-font);
    padding: 11px 22px; border-radius: 999px;
  }
}

/* late additions: drag housekeeping */
.st-panel { position: relative; }
.st-stage, .st-stage * { -webkit-user-select: none; user-select: none; }
.st-field--focus { border-radius: 6px; }
[hidden] { display: none !important; }
.st-modal a, .st-guard a, .st-toasts a { text-decoration: none; }

/* ==================================================================== power features
 * Command palette (Ctrl K), device-preset chips, inline text editing, multi-selection,
 * Jetons / Historique drawers, Code tab, Images panel, Mes blocs, measure + contrast
 * overlays, touch. Same chrome vocabulary as above, selection blue #3657FF. */

/* touch: the stage owns its gestures (two-finger pan, pinch); section rows drag with a finger */
.st-stage { touch-action: none; }
.st-row--section { touch-action: none; }

/* device-preset chips (artboards) */
.st-abchips { display: flex; gap: 2px; background: var(--st-chrome-2); border-radius: 8px; padding: 2px; }
.st-abchips button {
  border: 0; background: transparent; color: var(--st-ink-dim); cursor: pointer;
  font: 500 11px var(--st-font); padding: 5px 7px; border-radius: 6px; min-width: 34px;
}
.st-abchips button:hover { color: var(--st-ink); background: var(--st-chrome-3); }
.st-abchips button.is-on { background: var(--st-blue); color: #fff; }

/* top-bar icon buttons (contrast, jetons, historique) */
.st-iconbtn {
  display: flex; align-items: center; justify-content: center; width: 30px; height: 28px;
  background: transparent; border: 0; border-radius: 6px; color: var(--st-ink-dim); cursor: pointer;
}
.st-iconbtn svg { width: 16px; height: 16px; }
.st-iconbtn:hover { color: var(--st-ink); background: var(--st-chrome-3); }
.st-iconbtn.is-on, .st-iconbtn[aria-pressed="true"] { background: var(--st-blue); color: #fff; }

/* inline text editing in the artboard: a subtle ring, never the heavy selection outline */
.st-ab [contenteditable].st-inline {
  outline: 1.5px solid var(--st-blue) !important; outline-offset: 2px; border-radius: 2px;
  box-shadow: 0 0 0 5px rgba(54, 87, 255, 0.14); cursor: text; min-width: 8px;
}
.st-ab [contenteditable].st-inline::selection { background: rgba(54, 87, 255, 0.3); }

/* multi-selection: the inspector list of what is selected */
.st-multilist { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.st-multilist__row {
  display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 6px;
  background: var(--st-chrome-2); font-size: 12px;
}
.st-multilist__row .st-row__icon { width: 15px; height: 15px; }

/* command palette (Ctrl K) */
.st-cmdk {
  position: fixed; inset: 0; z-index: 130; background: rgba(10, 10, 10, 0.45);
  display: flex; align-items: flex-start; justify-content: center; padding-top: 11vh;
}
.st-cmdk__card {
  width: min(560px, 92vw); background: var(--st-chrome); border: 1px solid var(--st-line-d);
  border-radius: 12px; box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55); overflow: hidden;
}
.st-cmdk__card input {
  width: 100%; border: 0; border-bottom: 1px solid var(--st-line-d); background: transparent;
  color: var(--st-ink); font: 400 15px var(--st-font); padding: 14px 16px; outline: none;
}
.st-cmdk__list { max-height: 46vh; overflow-y: auto; padding: 6px; scrollbar-width: thin; }
.st-cmdk__item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: transparent; border: 0; color: var(--st-ink); cursor: pointer;
  font: 400 12px var(--st-font); padding: 8px 10px; border-radius: 7px;
}
.st-cmdk__item .st-cmdk__cat { color: var(--st-ink-dim); font-size: 11px; flex: none; min-width: 74px; }
.st-cmdk__item .st-cmdk__ttl { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-cmdk__item .st-cmdk__ttl b { font-weight: 600; color: #CFE0FF; }
.st-cmdk__item kbd { flex: none; }
.st-cmdk__item.is-active { background: var(--st-blue); color: #fff; }
.st-cmdk__item.is-active .st-cmdk__cat { color: rgba(255, 255, 255, 0.75); }
.st-cmdk__item.is-active .st-cmdk__ttl b { color: #fff; }
.st-cmdk__item.is-active kbd { color: rgba(255,255,255,0.85); background: rgba(255,255,255,0.14); border-color: transparent; }
.st-cmdk__recent { font-size: 11px; color: var(--st-ink-dim); text-transform: uppercase; letter-spacing: 0.05em; padding: 7px 10px 3px; }
.st-cmdk__empty { color: var(--st-ink-dim); padding: 16px 12px; font-size: 12px; }
.st-cmdk__foot {
  display: flex; gap: 16px; padding: 8px 14px; border-top: 1px solid var(--st-line-d);
  color: var(--st-ink-dim); font-size: 11px;
}
.st-cmdk__foot kbd { margin-right: 3px; }

/* right drawers: Jetons, Historique */
.st-drawer {
  position: fixed; top: 48px; right: 0; bottom: 0; width: 300px; z-index: 60;
  background: var(--st-chrome); border-left: 1px solid #111; display: flex; flex-direction: column;
  box-shadow: -16px 0 40px rgba(0, 0, 0, 0.35);
}
.st-drawer__head {
  display: flex; align-items: center; justify-content: space-between; flex: none;
  padding: 10px 12px; border-bottom: 1px solid var(--st-line-d);
}
.st-drawer__head h2 { margin: 0; font-size: 13px; font-weight: 600; }
.st-drawer__head .st-modal__close { position: static; }

/* Jetons */
.st-token {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: transparent; border: 0; border-radius: 7px; color: var(--st-ink);
  font: 400 12px var(--st-font); padding: 7px 8px; cursor: pointer;
}
.st-token:hover { background: var(--st-chrome-2); }
.st-token[disabled] { cursor: default; }
.st-token__swatch {
  width: 22px; height: 22px; border-radius: 6px; flex: none;
  border: 1px solid rgba(255, 255, 255, 0.25); box-shadow: inset 0 0 0 1px rgba(0,0,0,0.2);
}
.st-token__name { flex: 1 1 auto; min-width: 0; }
.st-token__name small { display: block; color: var(--st-ink-dim); font-size: 11px; }
.st-token__val { color: var(--st-ink-dim); font-size: 11px; font-variant-numeric: tabular-nums; }
.st-token__soon { font-size: 11px; color: var(--st-ink-dim); border: 1px solid var(--st-line-d); border-radius: 999px; padding: 1px 7px; }

/* Historique (named versions) */
.st-version { border: 1px solid var(--st-line-d); border-radius: 9px; padding: 8px 10px; margin-bottom: 8px; }
.st-version__head { display: flex; align-items: center; gap: 8px; }
.st-version__name { flex: 1 1 auto; min-width: 0; font-weight: 500; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-version__date { color: var(--st-ink-dim); font-size: 11px; white-space: nowrap; }
.st-version__row { display: flex; gap: 6px; margin-top: 7px; }
.st-version__row .st-ghostbtn { padding: 3px 9px; font-size: 11px; }
.st-version__shot {
  margin-top: 8px; width: 100%; height: 110px; overflow: hidden; border-radius: 6px;
  background: #fff; position: relative; display: none;
}
.st-version.is-open .st-version__shot { display: block; }
.st-version__shot > .jst { position: absolute; top: 0; left: 0; width: 390px; transform: scale(0.66); transform-origin: 0 0; pointer-events: none; }
.st-version__auto { color: var(--st-ink-dim); font-size: 11px; border: 1px solid var(--st-line-d); border-radius: 999px; padding: 0 6px; flex: none; }

/* inspector tabs + Code view */
.st-right__tabs { display: flex; border-bottom: 1px solid var(--st-line-d); flex: none; }
.st-right__tabs button {
  flex: 1; background: transparent; border: 0; border-bottom: 2px solid transparent;
  color: var(--st-ink-dim); font: 500 12px var(--st-font); padding: 7px 0; cursor: pointer;
}
.st-right__tabs button.is-on { color: var(--st-ink); border-bottom-color: var(--st-blue); }
.st-right__tabs button:hover { color: var(--st-ink); }
.st-code { display: flex; flex-direction: column; gap: 8px; }
.st-code__bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex: none; }
.st-code__bar span { font-size: 11px; color: var(--st-ink-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-code__bar .st-ghostbtn { padding: 3px 9px; font-size: 11px; flex: none; }
.st-code pre {
  margin: 0; flex: 1 1 auto; overflow: auto; background: #161616; border: 1px solid var(--st-line-d);
  border-radius: 8px; padding: 10px; font: 11px/1.55 ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  color: #D7E3F4; white-space: pre; scrollbar-width: thin;
}

/* Images (assets) panel */
.st-assets__title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--st-ink-dim); padding: 10px 6px 6px; }
.st-assets__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 4px; }
.st-asset {
  position: relative; border: 1px solid var(--st-line-d); border-radius: 9px; overflow: hidden;
  background: var(--st-chrome-2); cursor: pointer; padding: 0; text-align: left;
}
.st-asset:hover { border-color: var(--st-blue-soft); }
.st-asset img { display: block; width: 100%; height: 72px; object-fit: cover; background: #fff; }
.st-asset figcaption { padding: 5px 7px; font-size: 11px; color: var(--st-ink-dim); line-height: 1.35; }
.st-asset figcaption b { display: block; color: var(--st-ink); font-weight: 500; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-asset__kb { position: absolute; top: 5px; right: 5px; font-size: 11px; background: rgba(20,20,20,0.78); color: #ddd; border-radius: 5px; padding: 1px 5px; }
.st-asset__kb.is-heavy { background: var(--err); color: #fff; }
.st-assets__hint { color: var(--st-ink-dim); font-size: 11px; padding: 6px 8px 8px; line-height: 1.5; }
.st-assets__pick {
  margin: 6px 4px; padding: 7px 9px; border-radius: 8px; font-size: 12px; line-height: 1.45;
  background: rgba(54, 87, 255, 0.18); border: 1px solid rgba(94, 125, 255, 0.5); color: #DDE8FF;
}
.st-asset__credit a { color: inherit; }
.st-asset__credit a:hover { color: var(--st-ink); }

/* Mes blocs (saved sections) */
.st-blocks__title { display: flex; align-items: center; justify-content: space-between; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--st-ink-dim); padding: 14px 6px 6px; }
.st-blocks__title .st-ghostbtn { padding: 1px 7px; font-size: 11px; text-transform: none; letter-spacing: 0; }
.st-blocks__empty { color: var(--st-ink-dim); font-size: 12px; padding: 4px 8px 8px; line-height: 1.5; }
.st-blockcard b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.st-blockcard small { color: var(--st-ink-dim); font-size: 11px; }
.st-blockcard__rename {
  width: 92%; background: var(--st-chrome); color: var(--st-ink); border: 1px solid var(--st-blue);
  border-radius: 4px; font: 500 11px var(--st-font); padding: 2px 5px;
}
.st-blockcard__rename:focus { outline: none; }
.st-ghostbtn:disabled { opacity: 0.4; cursor: default; }
.st-ghostbtn:disabled:hover { background: transparent; }

/* measure overlay (Alt + hover): red, like Figma */
.st-measure { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 30; pointer-events: none; }
.st-measure__line { position: absolute; background: #F24822; }
.st-measure__tag {
  position: absolute; transform: translate(-50%, -50%) scale(var(--inv, 1)); background: #F24822; color: #fff;
  font: 600 11px var(--st-font); padding: 2px 6px; border-radius: 4px; white-space: nowrap;
}
.st-measure__h {
  position: absolute; transform: scale(var(--inv, 1)); transform-origin: 0 0; background: #F24822; color: #fff;
  font: 600 11px var(--st-font); padding: 2px 6px; border-radius: 4px; white-space: nowrap;
}

/* contrast overlay: red outline + ratio tag on texts that do not read */
.st-contrast-box { position: absolute; z-index: 29; pointer-events: none; outline: 2px solid #F24822; outline-offset: 1px; }
.st-contrast-tag {
  position: absolute; z-index: 31; pointer-events: none; transform: scale(var(--inv, 1)); transform-origin: 0 100%;
  background: #F24822; color: #fff; font: 600 11px var(--st-font); padding: 1px 6px; border-radius: 4px; white-space: nowrap;
}

/* the top bar got denser (chips + 3 icon buttons). Layout: the right cluster never shrinks
 * below its content (it used to, and slid UNDER the artboard chips at 1440 and 1194), the
 * center keeps its natural width, the left side (shop name) gives way first; the left/right
 * equal shares still centre the tools whenever the window is wide enough. */
.st-abchips button { min-width: 28px; padding: 5px 5px; }
.st-top__left { overflow: hidden; }
.st-top__center { flex: none; }
.st-top__right { min-width: max-content; }
#saveLabel { display: inline-block; min-width: 96px; }
@media (max-width: 1600px) {
  .st-badge { display: none; }
  .st-name { max-width: 150px; }
  .st-top { gap: 8px; }
  .st-top__left, .st-top__center, .st-top__right { gap: 6px; }
}
@media (max-width: 1500px) {
  /* the save state becomes the dot alone (label in its tooltip), so « Enregistrement… »
   * never pushes the clusters around */
  .st-save #saveLabel { display: none; }
  .st-save { padding: 0 4px; }
}
@media (max-width: 1360px) {
  .st-name { max-width: 110px; }
  .st-ghostbtn { padding: 5px 8px; }
  .st-brand { display: none; }
}
@media (max-width: 1240px) {
  /* iPad landscape (1194): the logo already leads back to the simple editor */
  #openSimple { display: none; }
  .st-top { padding: 0 6px; }
  .st-zoombtn { min-width: 62px; padding: 6px 4px; }
}

/* touch (iPad 1194×834): html.st-touch is set on a coarse pointer or at the first finger touch.
 * Hover-only affordances are shown permanently and the targets grow towards 44 px. */
.st-touch .st-row { height: 40px; }
.st-touch .st-row--child { height: 40px; }
.st-touch .st-row__btn { display: flex; width: 34px; height: 34px; }
.st-touch .st-row__btn svg { width: 16px; height: 16px; }
.st-touch .st-left__tabs button { min-height: 42px; }
.st-touch .st-top { height: 54px; }
.st-touch .st-tool, .st-touch .st-devices button { height: 38px; width: 36px; }
.st-touch .st-abchips button { min-height: 38px; }
.st-touch .st-iconbtn { height: 38px; width: 34px; }
.st-touch .st-ghostbtn, .st-touch .st-primary { min-height: 38px; }
.st-touch .st-helpbtn { width: 34px; height: 34px; }
.st-touch .st-menu button { padding: 11px 12px; }
.st-touch .st-typecard { min-height: 64px; }

/* ==================================================================== UI3 pass
 * The floating tool bar, the contextual bar on the selection, studio-drawn selection boxes,
 * tooltips, comments, one-at-a-time toasts, motion and the denser 28 px rhythm. Later rules
 * win over the ones above on purpose: this block is the current design. */

:root {
  --dur-1: 90ms;
  --dur-2: 160ms;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --st-sel: #3657FF;
  --st-left-w: 248px;
  --st-right-w: 272px;
  --st-pop: #262626;
  --st-pop-line: rgba(255, 255, 255, 0.09);
  --st-shadow-pop: 0 10px 30px rgba(0, 0, 0, 0.38), 0 1px 3px rgba(0, 0, 0, 0.3);
}
/* the store accent is the selection blue (Indigo): the selection turns magenta, like Figma's
 * component purple, so it never disappears into the store */
.st-sel-alt { --st-sel: #E5399B; }

body { font-size: 12px; -webkit-font-smoothing: antialiased; font-feature-settings: 'cv11', 'ss01'; }
.st-brand, .st-modal__card h2, .st-guard__card h1 { font-family: var(--st-brand-font); }
input[type="number"], .st-zoombtn, .st-count, .st-token__val, .st-inlinecount, .st-ftb__count { font-variant-numeric: tabular-nums; }

/* focus: a ring for the keyboard only (a mouse click on a tab left a thick white ring) */
.st :focus:not(:focus-visible), body :focus:not(:focus-visible) { outline: none; }
.st button:focus-visible, .st a:focus-visible, .st-modal button:focus-visible, .st-drawer button:focus-visible,
.st-cmdk button:focus-visible { outline: 2px solid var(--st-blue); outline-offset: 1px; }

/* motion: hover and press feedback on every control */
.st button, .st a, .st-row, .st-field input, .st-field textarea, .st-field select, .st-typecard, .st-asset,
.st-modal button, .st-modal a, .st-drawer button, .st-cmdk__item, .st-token, .st-swatch, .st-tplcard, .st-menu button {
  transition: background-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease),
    border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease), opacity var(--dur-1) var(--ease),
    filter var(--dur-1) var(--ease), transform var(--dur-1) var(--ease);
}
.st-primary:active { filter: brightness(0.88); transform: translateY(0.5px); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35); }
.st-ghostbtn:active, .st-secbtn:active, .st-iconbtn:active, .st-helpbtn:active, .st-ftb__btn:active,
.st-abchips button:active, .st-seg button:active, .st-selbar button:active, .st-addbtn:active, .st-menu button:active,
.st-left__tabs button:active, .st-right__tabs button:active, .st-tplcard:active, .st-typecard:active {
  background-color: #1A1A1A; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); transform: translateY(0.5px);
}
.st-danger:active { background: rgba(239, 68, 68, 0.3); transform: translateY(0.5px); }
.st-swatch:hover { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35); }
.st-swatch.is-on:hover { box-shadow: 0 0 0 2px var(--st-blue); }

@keyframes st-pop { from { opacity: 0; scale: 0.975; } to { opacity: 1; scale: 1; } }
@keyframes st-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes st-slide { from { opacity: 0; translate: 8px 0; } to { opacity: 1; translate: 0 0; } }
@keyframes st-rise { from { opacity: 0; translate: 0 6px; } to { opacity: 1; translate: 0 0; } }
@keyframes st-shake { 0%, 100% { translate: 0 0; } 25% { translate: -3px 0; } 50% { translate: 3px 0; } 75% { translate: -2px 0; } }
.st-menu:not([hidden]), .st-ctx, .st-pop:not([hidden]) { animation: st-pop var(--dur-2) var(--ease); transform-origin: 50% 100%; }
.st-ctx { transform-origin: 0 0; }
.st-cmdk:not([hidden]) { animation: st-fade var(--dur-2) var(--ease); }
.st-cmdk:not([hidden]) .st-cmdk__card { animation: st-pop var(--dur-2) var(--ease); transform-origin: 50% 0; }
.st-modal:not([hidden]) { animation: st-fade var(--dur-2) var(--ease); }
.st-modal:not([hidden]) .st-modal__card { animation: st-pop 200ms var(--ease); }
.st-drawer:not([hidden]) { animation: st-slide var(--dur-2) var(--ease); }
.st-prevcard:not([hidden]) { animation: st-fade var(--dur-1) var(--ease); }
.st-world.is-cam { transition: transform 200ms var(--ease); }
.st-stage.is-cam { transition: background-position 200ms var(--ease), background-size 200ms var(--ease); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}

/* ---------------------------------------------------------------- density (28 px rhythm) */
.st-left { width: var(--st-left-w); }
.st-right { width: var(--st-right-w); }
.st-drawer { width: var(--st-right-w); }
.st-top { height: 44px; }
.st-drawer { top: 44px; }
.st-row { height: 28px; gap: 6px; }
.st-row--child { height: 28px; }
.st-row__name { font-size: 12px; }
.st-row--child .st-row__name { font-size: 12px; }
.st-group__title { padding: 10px 8px 4px; }
.st-left__tabs button { padding: 9px 0; font-weight: 500; }
.st-right__head { padding: 10px 12px; font-size: 13px; }
.st-insp__head { padding: 10px 8px; font-size: 12px; }
.st-insp__body { gap: 10px; padding: 0 8px 12px; }
.st-field > label { font-size: 11px; }
.st-field input[type="text"], .st-field input[type="number"], .st-field select {
  height: 28px; padding: 0 8px; font-size: 12px; border-radius: 6px;
}
.st-field textarea { padding: 6px 8px; font-size: 12px; border-radius: 6px; }
.st-num__drag { width: 24px; border-radius: 6px 0 0 6px; }
.st-num input { border-radius: 0 6px 6px 0 !important; }
.st-seg button { padding: 5px 4px; font-size: 12px; }
.st-check { font-size: 12px; }
.st-addbtn { padding: 6px; font-size: 12px; border-radius: 6px; }

/* ---------------------------------------------------------------- top bar */
.st-top__center { gap: 8px; }
.st-name { text-overflow: ellipsis; white-space: nowrap; overflow: hidden; }
.st-name:focus { text-overflow: clip; }
.st-abchips__lbl { font-size: 11px; color: var(--st-ink-dim); font-weight: 500; }
.st-abchips button { font-size: 11px; min-width: 38px; height: 26px; padding: 0 6px; }
.st-iconbtn { height: 28px; width: 28px; border-radius: 6px; }
.st-ghostbtn, .st-primary { font-size: 12px; padding: 0 12px; height: 28px; border-radius: 6px; }
.st-primary { display: inline-flex; align-items: center; }
.st-helpbtn { width: 26px; height: 26px; font-size: 12px; }

/* ---------------------------------------------------------------- floating tool bar (UI3) */
.st-ftb {
  position: absolute; left: 50%; bottom: 16px; translate: -50% 0; z-index: 50;
  display: flex; align-items: center; gap: 2px; padding: 4px;
  background: #2C2C2C; border: 1px solid var(--st-pop-line); border-radius: 13px;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.26), 0 1px 3px rgba(0, 0, 0, 0.28);
  animation: st-rise 240ms var(--ease);
}
.st-ftb__btn {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border: 0; border-radius: 9px; background: transparent; color: #E6E6E6; cursor: pointer; padding: 0;
}
.st-ftb__btn--sm { width: 32px; }
.st-ftb__btn:hover { background: #3A3A3A; color: #fff; }
.st-ftb__btn.is-on, .st-ftb__btn[aria-expanded="true"] { background: var(--st-blue); color: #fff; }
.st-ftb__btn.is-on:hover { background: #4A68FF; }
.st-ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; display: block; }
.st-ftb__btn--sm .st-ico { width: 18px; height: 18px; }
.st-ftb__sep { width: 1px; height: 22px; background: #484848; margin: 0 4px; flex: none; }
.st-ftb__count {
  position: absolute; top: 3px; right: 2px; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 8px;
  background: #F24822; color: #fff; font: 600 11px/15px var(--st-font); text-align: center; box-shadow: 0 0 0 2px #2C2C2C;
}
.st-ftb .st-zoombtn { height: 38px; min-width: 66px; font: 500 12px var(--st-font); color: #E6E6E6; border-radius: 9px; padding: 0 6px 0 10px; gap: 3px; }
.st-ftb .st-zoombtn:hover { background: #3A3A3A; }
.st-ftb .st-zoombtn[aria-expanded="true"] { background: #3A3A3A; }
.st-menu--up { top: auto; bottom: calc(100% + 12px); }
.st-touch .st-ftb__btn { width: 44px; height: 44px; }
.st-touch .st-ftb .st-zoombtn { height: 44px; }

/* the canvas cursors of the tools */
.st-stage.is-text, .st-stage.is-text .st-ab__frame, .st-stage.is-text .st-ab__frame * { cursor: text !important; }
.st-stage.is-comment, .st-stage.is-comment .st-ab__frame, .st-stage.is-comment .st-ab__frame * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26' viewBox='0 0 26 26'%3E%3Cpath d='M3 23V11a8 8 0 018-8h4a8 8 0 010 16H9z' fill='%233657FF' stroke='white' stroke-width='2'/%3E%3C/svg%3E") 3 23, crosshair !important;
}
.st-ab .st-texthov { outline: 1.5px dashed rgba(54, 87, 255, 0.85) !important; outline-offset: 3px; border-radius: 2px; }
.st-stage.is-dragging, .st-stage.is-dragging * { cursor: grabbing !important; }
.st-ab .st-dragsrc { opacity: 0.4; transition: opacity var(--dur-2) var(--ease); }

/* ---------------------------------------------------------------- section popover (S) */
.st-pop {
  position: absolute; left: 50%; bottom: 72px; translate: -50% 0; z-index: 52; width: 448px;
  background: var(--st-pop); border: 1px solid var(--st-pop-line); border-radius: 12px; padding: 10px;
  box-shadow: var(--st-shadow-pop);
}
.st-pop__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 2px 4px 8px; }
.st-pop__head b { font-size: 13px; font-weight: 600; }
.st-pop__head span { font-size: 11px; color: var(--st-ink-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-pop__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.st-pop__card {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px 8px; border-radius: 9px;
  background: #2E2E2E; border: 1px solid transparent; color: var(--st-ink); cursor: grab; user-select: none; text-align: center;
  font: 500 11px/1.25 var(--st-font);
}
.st-pop__card svg { width: 40px; height: 28px; color: var(--st-ink-dim); transition: color var(--dur-1) var(--ease); }
.st-pop__card:hover, .st-pop__card.is-active { background: #363636; border-color: var(--st-blue-soft); }
.st-pop__card:hover svg { color: #fff; }
.st-pop__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 4px 0; font-size: 11px; color: var(--st-ink-dim); }
.st-linkbtn {
  background: transparent; border: 0; padding: 0; color: #9FB2FF; font: 500 12px var(--st-font); cursor: pointer; text-align: left;
}
.st-linkbtn:hover { color: #C8D3FF; }
.st-pop__foot .st-linkbtn { font-size: 11px; }

/* ---------------------------------------------------------------- contextual bar on the selection */
.st-selbar {
  position: absolute; z-index: 48; display: flex; align-items: center; gap: 1px; height: 34px; padding: 3px;
  background: #1E1E1E; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 9px; box-shadow: var(--st-shadow-pop);
  transition: opacity var(--dur-1) var(--ease); animation: st-fade var(--dur-1) var(--ease); white-space: nowrap;
}
.st-stage.is-cam .st-selbar, .st-stage.is-panning .st-selbar, .st-stage.is-dragging .st-selbar { opacity: 0; pointer-events: none; }
.st-selbar__name {
  display: flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px 0 7px; border-radius: 6px; max-width: 200px;
  background: var(--st-sel); color: #fff; font: 500 12px var(--st-font); border: 0; cursor: default;
}
.st-selbar__name span { overflow: hidden; text-overflow: ellipsis; }
.st-selbar__name svg { width: 14px; height: 14px; flex: none; }
.st-selbar__name small { font-size: 11px; opacity: 0.75; }
.st-selbar button:not(.st-selbar__name) {
  display: flex; align-items: center; justify-content: center; gap: 5px; min-width: 28px; height: 26px; padding: 0 5px;
  border: 0; border-radius: 6px; background: transparent; color: #DADADA; cursor: pointer; font: 500 12px var(--st-font);
}
.st-selbar button:not(.st-selbar__name):hover { background: #383838; color: #fff; }
.st-selbar button:disabled { opacity: 0.35; cursor: default; }
.st-selbar button:disabled:hover { background: transparent; }
.st-selbar button.is-danger:hover { color: #FF9C9C; background: rgba(239, 68, 68, 0.16); }
.st-selbar svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.st-selbar__sep { width: 1px; height: 18px; background: #3D3D3D; margin: 0 3px; flex: none; }
.st-touch .st-selbar { height: 44px; }
.st-touch .st-selbar button:not(.st-selbar__name) { min-width: 38px; height: 36px; }
.st-touch .st-selbar__name { height: 36px; }
.st-has-selbar .st-ab__tag { display: none; }

/* ---------------------------------------------------------------- selection, drawn by the studio */
.st-ab__sel { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 55; pointer-events: none; }
.st-selbox {
  position: absolute; pointer-events: none; border: calc(2px * var(--inv, 1)) solid var(--st-sel);
  box-shadow: 0 0 0 calc(1px * var(--inv, 1)) rgba(255, 255, 255, 0.9);
  animation: st-fade 60ms linear;
}
.st-selbox--dim { border-style: dashed; border-width: calc(1.5px * var(--inv, 1)); opacity: 0.7; box-shadow: none; }
.st-selbox--sub {
  border-width: calc(2px * var(--inv, 1)); margin: calc(-3px * var(--inv, 1)); padding: calc(3px * var(--inv, 1));
  box-sizing: content-box; border-radius: calc(3px * var(--inv, 1));
}
.st-hovbox {
  position: absolute; z-index: 54; pointer-events: none;
  border: calc(1.5px * var(--inv, 1)) solid color-mix(in srgb, var(--st-sel) 70%, transparent);
}
.st-hovbox.is-locked { border-style: dashed; border-color: #9AA6C8; }
.st-ab__tag { background: var(--st-sel); max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.st-ab__tag.is-inside { transform: scale(var(--inv, 1)); transform-origin: 0 0; border-radius: 4px; }

/* the live counter of the inline editor */
.st-inlinecount {
  position: absolute; z-index: 62; pointer-events: none; padding: 3px 7px; border-radius: 6px;
  background: #1E1E1E; color: #E8E8E8; font: 500 11px var(--st-font); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  animation: st-fade var(--dur-1) var(--ease);
}
.st-inlinecount.is-near { color: #FFD666; }
.st-inlinecount.is-max { background: #F5B800; color: #1E1E1E; }
.st-inlinecount.is-shake { animation: st-shake 260ms var(--ease); }

/* ---------------------------------------------------------------- comments (C) */
.st-pins { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 57; display: none; }
.st-stage.is-comment .st-pins, .st-comments-open .st-pins { display: block; }
.st-pin {
  position: absolute; width: 28px; height: 28px; transform: translate(0, -100%) scale(var(--inv, 1)); transform-origin: 0 100%;
  border-radius: 14px 14px 14px 3px; background: var(--st-blue); color: #fff; border: 2px solid #fff;
  font: 600 12px/24px var(--st-font); text-align: center; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); cursor: pointer; padding: 0;
  animation: st-pop var(--dur-2) var(--ease);
}
.st-pin:hover, .st-pin.is-active { background: #4A68FF; box-shadow: 0 0 0 3px rgba(54, 87, 255, 0.35), 0 4px 12px rgba(0, 0, 0, 0.3); }
.st-pin.is-resolved { background: #8A8A8A; }
.st-pin.is-draft { background: #fff; color: var(--st-blue); border-color: var(--st-blue); }
.st-pinlayer {
  position: absolute; z-index: 64; width: 264px; background: var(--st-pop); border: 1px solid var(--st-pop-line);
  border-radius: 11px; padding: 10px; box-shadow: var(--st-shadow-pop); animation: st-pop var(--dur-2) var(--ease);
}
.st-pinlayer textarea {
  width: 100%; min-height: 64px; resize: none; background: #1E1E1E; color: var(--st-ink); border: 1px solid #444;
  border-radius: 7px; font: 400 12px/1.5 var(--st-font); padding: 7px 8px;
}
.st-pinlayer textarea:focus { outline: none; border-color: var(--st-blue); }
.st-pinlayer__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.st-pinlayer__row small { color: var(--st-ink-dim); font-size: 11px; }
.st-comment { border: 1px solid var(--st-line-d); border-radius: 9px; padding: 9px 10px; margin-bottom: 8px; cursor: pointer; }
.st-comment:hover { background: var(--st-chrome-2); }
.st-comment.is-resolved { opacity: 0.6; }
.st-comment.is-active { border-color: var(--st-blue); }
.st-comment__head { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--st-ink-dim); }
.st-comment__num {
  width: 20px; height: 20px; border-radius: 10px 10px 10px 2px; background: var(--st-blue); color: #fff; font: 600 11px/20px var(--st-font);
  text-align: center; flex: none;
}
.st-comment.is-resolved .st-comment__num { background: #8A8A8A; }
.st-comment p { margin: 6px 0 8px; font-size: 12px; line-height: 1.5; color: var(--st-ink); white-space: pre-wrap; word-break: break-word; }
.st-comment__row { display: flex; gap: 6px; }
.st-comment__row .st-ghostbtn { height: 24px; padding: 0 8px; font-size: 11px; }
.st-comments__note {
  font-size: 11px; line-height: 1.5; color: var(--st-ink-dim); padding: 8px 10px; margin: 2px 0 10px; border-radius: 8px;
  background: rgba(245, 184, 0, 0.08); border: 1px solid rgba(245, 184, 0, 0.3);
}
.st-comments__note b { color: #FFD666; font-weight: 600; }
.st-comments__empty { color: var(--st-ink-dim); font-size: 12px; line-height: 1.6; padding: 6px 4px; }
.st-comments__tabs { display: flex; gap: 2px; background: var(--st-chrome-2); border-radius: 8px; padding: 2px; margin-bottom: 10px; }
.st-comments__tabs button { flex: 1; background: transparent; border: 0; border-radius: 6px; color: var(--st-ink-dim); font: 500 12px var(--st-font); padding: 5px; cursor: pointer; }
.st-comments__tabs button.is-on { background: #3A3A3A; color: var(--st-ink); }

/* ---------------------------------------------------------------- tooltip */
.st-tip {
  position: fixed; z-index: 220; pointer-events: none; max-width: 260px;
  background: #0E0E0E; color: #F2F2F2; border-radius: 6px; padding: 6px 8px;
  font: 500 11px/1.35 var(--st-font); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  animation: st-fade var(--dur-1) var(--ease);
}
.st-tip__main { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.st-tip kbd { background: #2E2E2E; border: 0; color: #CFCFCF; font-size: 11px; padding: 1px 5px; border-radius: 4px; }
.st-tip__sub { display: block; color: #A8A8A8; font-weight: 400; margin-top: 2px; }

/* ---------------------------------------------------------------- toasts: one, bottom-left of the canvas */
.st-toasts {
  left: calc(var(--st-left-w) + 16px); bottom: 74px; transform: none; align-items: flex-start; max-width: 380px;
}
.st-chrome-off .st-toasts { left: 16px; }
.st-toast { font-size: 12px; padding: 8px 14px; border-radius: 9px; line-height: 1.45; transition: opacity 240ms var(--ease), translate 240ms var(--ease); }
.st-toast.is-out { opacity: 0; translate: 0 4px; }

/* panels hidden (Ctrl \) */
.st-chrome-off .st-left, .st-chrome-off .st-right { display: none; }

/* ---------------------------------------------------------------- inspector pieces */
.st-insp__row { display: flex; align-items: center; gap: 4px; }
.st-insp__label { flex: 1 1 auto; font-size: 12px; color: var(--st-ink); }
.st-iconbtn--sq { width: 28px; height: 28px; background: var(--st-chrome-2); border: 1px solid transparent; }
.st-iconbtn--sq:hover { border-color: var(--st-line-d); }
.st-iconbtn--sq:disabled { opacity: 0.35; cursor: default; }
.st-iconbtn--sq svg { width: 16px; height: 16px; }
.st-promise {
  display: flex; gap: 9px; align-items: flex-start; padding: 9px 10px; border-radius: 8px;
  background: rgba(54, 87, 255, 0.1); border: 1px solid rgba(94, 125, 255, 0.32);
}
.st-promise > svg { width: 16px; height: 16px; flex: none; color: #9FB2FF; margin-top: 1px; }
.st-promise b { display: block; font-size: 12px; font-weight: 600; color: #DDE5FF; margin-bottom: 2px; }
.st-promise span { display: block; font-size: 11px; line-height: 1.5; color: #B8C2E0; }
.st-promise .st-linkbtn { margin-top: 5px; font-size: 11px; }
.st-btnrow { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.st-secbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 28px; padding: 4px 8px;
  background: #333; border: 1px solid #444; color: var(--st-ink); border-radius: 6px; font: 500 12px var(--st-font); cursor: pointer;
}
.st-secbtn:hover { background: #3C3C3C; border-color: #555; }
.st-btnrow .st-danger { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 28px; padding: 4px 8px; border-radius: 6px; }
.st-secbtn kbd, .st-danger kbd { background: transparent; border-color: rgba(255, 255, 255, 0.14); color: inherit; opacity: 0.75; font-size: 11px; padding: 0 4px; }
.st-multilist + .st-secbtn, .st-secbtn + .st-secbtn, .st-secbtn + .st-danger { width: 100%; }
.st-imgfield__row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.st-imgfield__row > * { min-width: 0; }
.st-imgfield__row .st-ghostbtn { padding: 0 6px; font-size: 12px; overflow: hidden; text-overflow: ellipsis; justify-content: center; }
.st-imgfield__row > :nth-child(3) { grid-column: 1 / -1; }
.st-code pre { white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; }
.st-insert__hint b { color: var(--st-ink); font-weight: 600; }
.st-insert__hint kbd { font-size: 11px; }

/* touch: the padlock and the eye only on the selected row (they truncated every name) */
.st-touch .st-row__btn { display: none; }
.st-touch .st-row.is-sel .st-row__btn, .st-touch .st-row__btn.is-active { display: flex; }
.st-touch .st-row { height: 40px; }

/* ---------------------------------------------------------------- dialogs */
.st-modal__list { margin: 4px 0 6px; padding: 0 0 0 18px; color: #C8C8C8; font-size: 12px; line-height: 1.7; }
.st-modal__list b { color: var(--st-ink); font-weight: 600; }
.st-modal__card--help { max-height: 84vh; padding-bottom: 34px;
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 30px), transparent);
          mask-image: linear-gradient(to bottom, #000 calc(100% - 30px), transparent); }
.st-help__row { font-size: 12px; }

/* onboarding: the three gestures, above the tool bar, once */
.st-coach {
  position: absolute; left: 50%; bottom: 74px; translate: -50% 0; z-index: 53; width: 420px;
  background: #fff; color: #1E1E1E; border-radius: 12px; padding: 14px 16px 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22); animation: st-rise 260ms var(--ease);
}
.st-coach::after {
  content: ''; position: absolute; left: 50%; bottom: -6px; width: 12px; height: 12px; background: #fff;
  transform: translateX(-50%) rotate(45deg); border-radius: 2px;
}
.st-coach h3 { margin: 0 0 6px; font: 600 13px var(--st-font); }
.st-coach ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 5px; }
.st-coach li { display: flex; gap: 8px; align-items: baseline; font-size: 12px; line-height: 1.45; color: #3A3A3A; }
.st-coach kbd { background: #F0F0F0; border-color: #DDD; color: #333; flex: none; }
.st-coach__row { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.st-coach__row small { font-size: 11px; color: #777; }
.st-coach .st-primary { height: 28px; }

/* command palette: fixed rows, icons, category headers */
.st-cmdk__card input {
  padding-left: 40px; font-size: 15px;
  background: no-repeat 14px 50% / 16px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239E9E9E' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='M16 16l4 4'/%3E%3C/svg%3E");
}
.st-cmdk__item { height: 36px; padding: 0 10px; font-size: 12px; }
.st-cmdk__ico { width: 16px; height: 16px; flex: none; color: var(--st-ink-dim); display: flex; }
.st-cmdk__ico svg { width: 16px; height: 16px; }
.st-cmdk__item.is-active .st-cmdk__ico { color: #fff; }
.st-cmdk__item .st-cmdk__cat { min-width: 0; order: 3; font-size: 11px; }
.st-cmdk__item kbd { order: 4; }
.st-cmdk__recent { padding: 10px 10px 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; }

/* toasts: top-centre of the canvas, clear of the tool bar, its popover and the selection bar */
.st-toasts {
  top: 56px; bottom: auto; transform: translateX(-50%); align-items: center; max-width: 460px;
  left: calc(var(--st-left-w) + (100vw - var(--st-left-w) - var(--st-right-w)) / 2);
}
.st-chrome-off .st-toasts { left: 50%; }
.st-toast.is-out { translate: 0 -4px; }
@keyframes st-toast-in { from { opacity: 0; translate: 0 -6px; } to { opacity: 1; translate: 0 0; } }

/* inspector header: one line, the type as a dim suffix */
.st-right__head { align-items: center; min-width: 0; }
#inspTitle { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-right__sub { flex: 0 1 auto; max-width: 45%; }

/* image buttons: « Choisir dans Images » gets a full row, never clipped */
.st-imgfield__row > * { grid-column: 1 / -1; }
.st-imgfield__row > :nth-child(1):not(:last-child):not(:nth-last-child(2)) { grid-column: auto; order: 1; }
.st-imgfield__row > :nth-child(3) { grid-column: auto; order: 2; }
.st-imgfield__row > :nth-child(2) { order: 3; }

.st-coach { width: 470px; }
.st-selbar__name { max-width: 240px; }
.st-pop.is-leaving { opacity: 0; pointer-events: none; transition: opacity var(--dur-1) var(--ease); }

/* ---------------------------------------------------------------- folding side panels (like Claude's sidebar) */
.st-body { position: relative; }
.st-left, .st-right { transition: width .2s cubic-bezier(.2, .8, .2, 1); }
.st-left-off .st-left, .st-right-off .st-right { width: 0 !important; border: 0; overflow: hidden; visibility: hidden; }
.st-paneltoggle {
  flex: none; display: grid; place-items: center; width: 28px; height: 28px; margin: auto 6px auto 2px; padding: 0;
  border: 0; border-radius: 6px; background: transparent; color: var(--st-ink-dim); cursor: pointer;
}
.st-paneltoggle svg, .st-reopen svg { width: 16px; height: 16px; }
.st-paneltoggle:hover { color: var(--st-ink); background: var(--st-chrome-2); }
.st-paneltoggle:focus-visible, .st-reopen:focus-visible { outline: 2px solid var(--st-blue); outline-offset: 1px; }
.st-right__head { display: flex; align-items: center; gap: 6px; }
.st-right__head .st-paneltoggle { margin-left: auto; }
.st-reopen {
  position: absolute; top: 10px; z-index: 40; display: grid; place-items: center; width: 32px; height: 32px; padding: 0;
  border: 1px solid var(--st-line-d); border-radius: 8px; background: var(--st-chrome); color: var(--st-ink-dim); cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
}
.st-reopen:hover { color: var(--st-ink); background: var(--st-chrome-2); }
.st-reopen[hidden] { display: none; }
.st-reopen--l { left: 10px; }
.st-reopen--r { right: 10px; }

/* ---------------------------------------------------------------- layers tree: disclosure arrows and element rows */
.st-row__tw {
  flex: none; display: grid; place-items: center; width: 16px; height: 16px; margin: 0 2px 0 -6px; padding: 0;
  border: 0; background: none; color: var(--st-ink-dim); cursor: pointer; border-radius: 4px;
}
.st-row__tw.is-empty { cursor: default; }
.st-row__tw svg { width: 12px; height: 12px; transition: transform .15s ease; }
.st-row__tw.is-open svg { transform: rotate(90deg); }
.st-row__tw:hover { color: var(--st-ink); background: var(--st-chrome-3); }
.st-row--el { margin-left: 44px; }
.st-row--el .st-row__icon { color: var(--st-ink-dim); }

/* wave 1 (audit items 14–16): the CSS / JSON switch of the Code tab is never cut (the label gives way),
   the left tabs keep an 8 px margin beside the fold button, a toast clears the rulers */
.st-code__bar #inspCodeLabel { flex: 1 1 auto; min-width: 0; }
.st-code__bar .st-code__mode { flex: none; overflow: visible; white-space: nowrap; }
.st-left__tabs { padding: 0 8px; gap: 4px; }
body:has(.st-eng-has-rulers) .st-toasts { top: 80px; }

/* wave 1 (audit item 24): the inspector's fields grow to 36 px under the finger (iPad) */
.st-touch .dz-num, .st-touch .dz-text:not(textarea), .st-touch .dz-select, .st-touch .st-eng-num, .st-touch .st-eng-select, .st-touch .st-eng-input { height: 36px; }
.st-touch .dz-num input, .st-touch .st-eng-num input { height: 34px; }

/* ------------------------------------------------------------------ Aperçu (Preview mode, wave 2: studio-preview.js)
   The store full-screen at the chosen width, interactive; nothing to edit. */
.st-previewbtn { display: inline-flex; align-items: center; gap: 6px; }
.st-previewbtn svg { width: 12px; height: 12px; }
.st-previewbtn[aria-pressed="true"] { color: #FFFFFF; border-color: var(--st-blue); }
.st-preview { position: fixed; inset: 0; z-index: 9000; display: flex; flex-direction: column; background: #141414; color: var(--st-ink); }
.st-preview[hidden] { display: none; }
.st-preview__bar { flex: none; display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 12px; background: var(--st-chrome); border-bottom: 1px solid var(--st-line-d, #333); flex-wrap: wrap; }
.st-preview__t { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; }
.st-preview__t svg { width: 12px; height: 12px; color: var(--st-blue); }
.st-preview__seg { display: inline-flex; gap: 2px; padding: 2px; border-radius: 8px; background: var(--st-chrome-2); }
.st-preview__w { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 72px; min-height: 36px; padding: 2px 10px; border: 0; border-radius: 6px; background: transparent; color: var(--st-ink-dim); font: inherit; cursor: pointer; }
.st-preview__w b { font-size: 12px; font-weight: 600; color: inherit; }
.st-preview__w small { font-size: 10.5px; opacity: .8; }
.st-preview__w:hover { color: var(--st-ink); background: var(--st-chrome-3); }
.st-preview__w.is-on { color: #FFFFFF; background: var(--st-blue); }
.st-preview__w:focus-visible, .st-preview__close:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 2px; }
.st-preview__info { flex: 1 1 auto; min-width: 0; font-size: 12px; color: var(--st-ink-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-preview__close { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px; border: 1px solid var(--st-line-d, #444); border-radius: 6px; background: transparent; color: var(--st-ink); font: inherit; cursor: pointer; }
.st-preview__close kbd { font-size: 10.5px; }
.st-preview__stage { flex: 1 1 auto; min-height: 0; overflow: auto; display: flex; justify-content: center; padding: 16px; }
.st-preview__frame { flex: none; min-height: 100%; background: #FFFFFF; box-shadow: 0 10px 40px rgba(0, 0, 0, .45); border-radius: 6px; overflow: hidden; }
.st-preview__frame.is-full { border-radius: 0; }
.st-preview__stage:has(.is-full) { padding: 0; }
html.st-previewing { overflow: hidden; }

/* element styles in vw / vh (wave 2): measured against the artboard, as on a screen that wide */
[data-jst-cq].jst-cq-on { container-type: inline-size; }

/* layers: dragging a node's row (wave 2) */
.st-erow-drop { position: fixed; z-index: 9500; pointer-events: none; background: var(--st-blue); border-radius: 2px; }
.st-erow-drop.is-into { background: transparent; box-shadow: inset 0 0 0 2px var(--st-blue); border-radius: 4px; }
.st-row.is-dragging { opacity: .5; }
body.st-rowdragging, body.st-rowdragging * { cursor: grabbing !important; user-select: none; }
