/* Example Ui · studio.css
 * The browser studio. Same drafting-sheet language as the landing page (css/site.css): blueprint ink panels,
 * hairlines, mono labels, square corners and one hot colour for the thing you are doing right now.
 * The 3D viewport is the only place that is not blueprint: that is the built side.
 */
:root {
  --ink: #0a3a3f;
  --ink-mid: #08343a;
  --ink-deep: #062b30;
  --ink-black: #04222a;
  --line-rgb: 228, 250, 244;
  --text: #eafbf6;
  --mute: rgba(var(--line-rgb), .76);
  --faint: rgba(var(--line-rgb), .56);
  --hair: rgba(var(--line-rgb), .16);
  --hair-strong: rgba(var(--line-rgb), .38);
  --hot: #ff5a2b;
  --hot-deep: #c93c14;
  --hot-ink: #210b03;
  --hot-soft: #ff9d7a;
  --ok: #8ff0b8;
  --warn: #ffd166;
  --bad: #ff8f8f;
  --axis-x: #ff5a2b;
  --axis-y: #8ff0b8;
  --axis-z: #6fc3ff;

  --font-display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --dock-left: 316px;
  --dock-right: 304px;
  --dock-bottom: 168px;
  --row: 22px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body.st {
  margin: 0; overflow: hidden;
  background: var(--ink-deep); color: var(--text);
  font: 400 13px/1.4 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 1px; }
::selection { background: var(--hot); color: var(--hot-ink); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ico { flex: none; width: 16px; height: 16px; display: block; }
.ico--service { color: #9fe8ff; } .ico--part { color: #c9d6e2; } .ico--model { color: #ffd166; } .ico--folder { color: #ffd9a8; }
.ico--script { color: #7fd0ff; } .ico--local { color: #8ff0b8; } .ico--module { color: #c9a5ff; } .ico--light { color: #fff3a8; }
.ico--effect { color: #ff9d7a; } .ico--gui { color: #7fd0ff; } .ico--box { color: #a9b6c9; } .ico--text { color: #ffd166; }
.ico--image { color: #7fe0a8; } .ico--mod { color: #c9a5ff; } .ico--value { color: #ffb86b; } .ico--remote { color: #ffd166; }
.ico--sound { color: #9fe8ff; } .ico--input { color: #ff9d7a; } .ico--misc { color: var(--mute); }

* { scrollbar-width: thin; scrollbar-color: var(--hair-strong) transparent; }

/* ---------------------------------------------------------------- frame */
.st-app { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; height: 100%; min-height: 0; }

.st-top {
  display: flex; align-items: stretch; gap: 0;
  min-height: 44px; padding: 0 8px 0 0;
  background: var(--ink-mid); border-bottom: 1px solid var(--hair-strong);
}
.st-brand { display: flex; align-items: center; gap: 8px; padding: 0 14px 0 12px; color: var(--text); text-decoration: none; border-right: 1px solid var(--hair); }
.st-brand:hover { background: rgba(var(--line-rgb), .06); }
.st-brand .mark { width: 22px; height: 22px; }
.mark-a { fill: currentColor; } .mark-b { fill: var(--hot); }
.st-brand b { font: 800 21px/1 var(--font-display); letter-spacing: .02em; white-space: nowrap; }
.st-brand span { font: 500 10.5px/1 var(--font-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--hot-soft); padding-top: 3px; }
.st-project { display: flex; align-items: center; gap: 8px; padding: 0 10px; border-right: 1px solid var(--hair); min-width: 0; }
.st-project input {
  width: 15ch; min-width: 0; padding: 5px 6px; border: 1px solid transparent; background: transparent;
  font: 500 13px/1.2 var(--font-mono); color: var(--text); text-overflow: ellipsis;
}
.st-project input:hover { border-color: var(--hair); }
.st-project input:focus { outline: 0; border-color: var(--text); background: var(--ink-deep); }
.st-saved { font: 400 10.5px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); white-space: nowrap; }
.st-saved[data-dirty] { color: var(--hot-soft); }

.st-tabsbar { display: flex; align-items: stretch; margin-left: 2px; min-width: 0; }
.st-tabsbar button {
  appearance: none; border: 0; background: none; cursor: pointer; position: relative;
  padding: 0 13px; color: var(--mute);
  font: 500 11.5px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap;
}
.st-tabsbar button:hover { color: var(--text); background: rgba(var(--line-rgb), .06); }
.st-tabsbar button[aria-selected="true"] { color: var(--text); }
.st-tabsbar button[aria-selected="true"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px; background: var(--hot); }
.st-top-fill { flex: 1; min-width: 8px; }
.st-top-actions { display: flex; align-items: center; gap: 6px; }

.btn {
  appearance: none; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 30px; padding: 0 11px;
  background: transparent; color: var(--text);
  box-shadow: inset 0 0 0 1px var(--hair-strong);
  font: 500 12.5px/1 var(--font-body); white-space: nowrap; text-decoration: none;
}
.btn:hover { background: rgba(var(--line-rgb), .08); box-shadow: inset 0 0 0 1px var(--text); }
.btn:disabled { opacity: .38; cursor: default; background: transparent; box-shadow: inset 0 0 0 1px var(--hair); }
.btn--hot { background: var(--hot); color: var(--hot-ink); box-shadow: 0 3px 0 var(--hot-deep); font-weight: 600; }
.btn--hot:hover { background: #ff6c41; box-shadow: 0 3px 0 var(--hot-deep); }
.btn--hot:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--hot-deep); }
.btn--hot:disabled { background: var(--hot); box-shadow: 0 3px 0 var(--hot-deep); }
.btn--quiet { box-shadow: none; color: var(--mute); }
.btn--quiet:hover { box-shadow: none; color: var(--text); }
.btn--icon { min-width: 30px; padding: 0 7px; }
.btn--stop { background: var(--text); color: var(--ink); box-shadow: 0 3px 0 rgba(var(--line-rgb), .45); font-weight: 600; }
.btn--stop:hover { background: #fff; box-shadow: 0 3px 0 rgba(var(--line-rgb), .45); }
.btn[aria-pressed="true"] { background: rgba(255, 90, 43, .16); box-shadow: inset 0 0 0 1px var(--hot); }

/* ---------------------------------------------------------------- ribbon */
.st-ribbon {
  display: flex; align-items: stretch; min-height: 64px;
  background: var(--ink); border-bottom: 1px solid var(--hair-strong);
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
}
.st-ribbon::-webkit-scrollbar { display: none; }
.rb-group { position: relative; display: flex; align-items: center; gap: 2px; padding: 5px 10px 17px; border-right: 1px solid var(--hair); flex: none; }
.rb-group > .rb-label { position: absolute; left: 0; right: 0; bottom: 4px; text-align: center; font: 500 9.5px/1 var(--font-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--faint); pointer-events: none; }
.rb-btn {
  appearance: none; border: 0; cursor: pointer; background: transparent; color: var(--text);
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 26px; padding: 0 7px; white-space: nowrap;
  font: 500 12px/1 var(--font-body);
}
.rb-btn:hover { background: rgba(var(--line-rgb), .09); }
.rb-btn:disabled { opacity: .35; cursor: default; background: transparent; }
.rb-btn[aria-pressed="true"] { background: rgba(255, 90, 43, .18); box-shadow: inset 0 0 0 1px var(--hot); }
.rb-btn--big { flex-direction: column; justify-content: center; gap: 5px; min-width: 50px; min-height: 42px; padding: 3px 6px; font-size: 11.5px; }
.rb-btn--big .ico { width: 18px; height: 18px; }
.rb-btn .caret { width: 9px; height: 9px; opacity: .7; }
.rb-stack { display: grid; gap: 1px; align-content: center; }
.rb-field { display: inline-flex; align-items: center; gap: 6px; min-height: 24px; padding: 0 4px; font: 500 11.5px/1 var(--font-mono); color: var(--mute); white-space: nowrap; }
.rb-field input[type="number"], .rb-field select {
  width: 62px; height: 22px; padding: 0 5px; border: 1px solid var(--hair-strong); background: var(--ink-deep); color: var(--text);
  font: 500 12px/1 var(--font-mono);
}
.rb-field select { width: auto; max-width: 150px; }
.rb-swatch { width: 16px; height: 16px; box-shadow: 0 0 0 1px rgba(var(--line-rgb), .55); flex: none; background: #a3a2a5; }
.check { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; white-space: nowrap; }
.check input { appearance: none; width: 14px; height: 14px; margin: 0; border: 1px solid var(--hair-strong); background: var(--ink-deep); display: grid; place-items: center; cursor: pointer; flex: none; }
.check input:checked { background: var(--hot); border-color: var(--hot); }
.check input:checked::after { content: ""; width: 7px; height: 4px; border-left: 2px solid var(--hot-ink); border-bottom: 2px solid var(--hot-ink); transform: rotate(-45deg) translate(1px, -1px); }

/* ---------------------------------------------------------------- body */
.st-body { display: grid; grid-template-columns: var(--dock-left) 5px minmax(0, 1fr) 5px var(--dock-right); min-height: 0; }
.st-body[data-left="off"] { grid-template-columns: 0 0 minmax(0, 1fr) 5px var(--dock-right); }
.st-body[data-right="off"] { grid-template-columns: var(--dock-left) 5px minmax(0, 1fr) 0 0; }
.st-body[data-left="off"][data-right="off"] { grid-template-columns: 0 0 minmax(0, 1fr) 0 0; }
.st-body[data-left="off"] > .st-dock--left, .st-body[data-left="off"] > [data-split="left"],
.st-body[data-right="off"] > .st-dock--right, .st-body[data-right="off"] > [data-split="right"] { display: none; }
/* every child has its own column, so a hidden dock never shifts the others */
.st-body > * { grid-row: 1; }
.st-body > .st-dock--left { grid-column: 1; }
.st-body > [data-split="left"] { grid-column: 2; }
.st-body > .st-center { grid-column: 3; }
.st-body > [data-split="right"] { grid-column: 4; }
.st-body > .st-dock--right { grid-column: 5; }
.st-dock { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--ink-mid); }
.st-split { background: var(--ink-deep); position: relative; touch-action: none; }
.st-split--x { cursor: col-resize; border-inline: 1px solid var(--hair); }
.st-split--y { cursor: row-resize; border-block: 1px solid var(--hair); height: 5px; }
.st-split:hover, .st-split[data-active] { background: var(--hot); border-color: var(--hot); }
.st-center { display: grid; grid-template-rows: auto minmax(0, 1fr) 5px var(--dock-bottom); min-width: 0; min-height: 0; }
.st-center[data-bottom="off"] { grid-template-rows: auto minmax(0, 1fr) 0 0; }
.st-center[data-bottom="off"] > .st-bottom, .st-center[data-bottom="off"] > [data-split="bottom"] { display: none; }

.st-tabs { display: flex; align-items: stretch; min-height: 28px; background: var(--ink-deep); border-bottom: 1px solid var(--hair); overflow-x: auto; scrollbar-width: none; }
.st-tab {
  appearance: none; border: 0; cursor: pointer; background: transparent; color: var(--mute);
  display: inline-flex; align-items: center; gap: 7px; padding: 0 10px 0 11px; border-right: 1px solid var(--hair);
  font: 500 12px/1 var(--font-mono); white-space: nowrap; flex: none;
}
.st-tab:hover { color: var(--text); }
.st-tab[aria-selected="true"] { background: var(--ink-mid); color: var(--text); box-shadow: inset 0 2px 0 var(--hot); }
.st-tab .x { display: grid; place-items: center; width: 16px; height: 16px; margin-right: -4px; opacity: .6; }
.st-tab .x:hover { opacity: 1; background: rgba(var(--line-rgb), .14); }
.st-tab .x .ico { width: 10px; height: 10px; }
.st-tab[data-dirty] .st-tab-name::after { content: " •"; color: var(--hot-soft); }
.st-tabs-fill { flex: 1; }
.st-tabs-note { display: inline-flex; align-items: center; padding: 0 12px; font: 400 11px/1 var(--font-mono); color: var(--faint); white-space: nowrap; }

.st-stage { position: relative; min-width: 0; min-height: 0; background: var(--ink-black); }
.st-viewport { position: absolute; inset: 0; overflow: hidden; background: var(--ink-black); }
.st-canvas { display: block; outline: 0; touch-action: none; }
.st-nowebgl::after { content: "This browser could not start WebGL, so the 3D viewport is unavailable. The Explorer, Properties and scripts still work."; position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; color: var(--mute); font: 400 14px/1.5 var(--font-mono); }
.st-code { position: absolute; inset: 0; background: var(--ink-deep); display: flex; flex-direction: column; }

/* viewport furniture */
.st-vp-corner { position: absolute; z-index: 5; pointer-events: none; font: 500 11px/1.4 var(--font-mono); color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .7); }
.st-vp-corner--tl { left: 10px; top: 8px; }
.st-vp-corner--bl { left: 10px; bottom: 8px; }
.st-vp-corner--tr { right: 10px; top: 8px; text-align: right; }
.st-vp-tag { display: inline-block; padding: 4px 7px; background: rgba(6, 43, 48, .82); box-shadow: inset 0 0 0 1px var(--hair-strong); text-shadow: none; color: var(--text); letter-spacing: .04em; }
.st-vp-tag b { color: var(--hot-soft); font-weight: 600; }
.st-draglabel { position: absolute; z-index: 8; padding: 4px 7px; background: var(--hot); color: var(--hot-ink); font: 600 11px/1 var(--font-mono); pointer-events: none; white-space: nowrap; }
.st-marquee { position: absolute; z-index: 7; border: 1px solid var(--hot); background: rgba(255, 90, 43, .12); pointer-events: none; }
.st-axes { position: absolute; right: 10px; bottom: 10px; z-index: 5; width: 64px; height: 64px; pointer-events: none; }
.st-buildline { position: absolute; top: 0; bottom: 0; z-index: 9; width: 2px; margin-left: -1px; background: var(--hot); pointer-events: none; box-shadow: 0 0 0 1px rgba(0, 0, 0, .2); }
.st-buildline::before { content: "Draft"; position: absolute; right: 3px; top: 12px; padding: 5px 8px; font: 600 10.5px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--hot); background: var(--ink-deep); box-shadow: inset 0 0 0 1px var(--hot); }
.st-buildline::after { content: "Built"; position: absolute; left: 3px; top: 12px; padding: 5px 8px; font: 600 10.5px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--hot-ink); background: var(--hot); }
.st-buildline[data-drag] { pointer-events: auto; cursor: ew-resize; width: 14px; margin-left: -7px; background: linear-gradient(90deg, transparent 6px, var(--hot) 6px 8px, transparent 8px); box-shadow: none; }

/* ---------------------------------------------------------------- panels */
.pn { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.pn-head { display: flex; align-items: center; gap: 8px; min-height: 30px; padding: 0 6px 0 11px; border-bottom: 1px solid var(--hair); flex: none; }
.pn-title { margin: 0; font: 600 10.5px/1 var(--font-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--mute); white-space: nowrap; }
.pn-meta { font: 400 11px/1 var(--font-mono); color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pn-fill { flex: 1; min-width: 4px; }
.pn-tool { appearance: none; border: 0; background: none; cursor: pointer; display: grid; place-items: center; width: 24px; height: 24px; color: var(--mute); flex: none; }
.pn-tool:hover { color: var(--text); background: rgba(var(--line-rgb), .09); }
.pn-tool[aria-pressed="true"] { color: var(--hot-soft); }
.pn-tool .ico { width: 14px; height: 14px; }
.pn-search { position: relative; flex: none; padding: 6px 8px; border-bottom: 1px solid var(--hair); }
.pn-search input { width: 100%; height: 24px; padding: 0 8px 0 26px; border: 1px solid var(--hair); background: var(--ink-deep); font: 400 12px/1 var(--font-mono); }
.pn-search input:focus { outline: 0; border-color: var(--text); }
.pn-search input::placeholder { color: var(--faint); }
.pn-search .ico { position: absolute; left: 15px; top: 50%; margin-top: -7px; width: 14px; height: 14px; color: var(--faint); }
.pn-body { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.pn-empty { padding: 18px 14px; color: var(--faint); font: 400 12px/1.6 var(--font-mono); }
.pn-tabs { display: flex; flex: none; border-bottom: 1px solid var(--hair-strong); background: var(--ink-deep); }
.pn-tabs button { appearance: none; border: 0; background: none; cursor: pointer; flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 32px; color: var(--mute); font: 600 10.5px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; border-right: 1px solid var(--hair); }
.pn-tabs button:last-child { border-right: 0; }
.pn-tabs button:hover { color: var(--text); }
.pn-tabs button[aria-selected="true"] { background: var(--ink-mid); color: var(--text); box-shadow: inset 0 2px 0 var(--hot); }
.st-dock--right { display: grid; grid-template-rows: minmax(120px, 1.15fr) 5px minmax(120px, 1fr); }
.st-dock--right[style*="--explorer"] { grid-template-rows: var(--explorer) 5px minmax(100px, 1fr); }

/* explorer */
.ex-list { position: relative; flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; outline: 0; }
.ex-spacer { position: relative; width: 100%; }
.ex-row {
  position: absolute; left: 0; right: 0; height: var(--row);
  display: flex; align-items: center; gap: 5px;
  padding: 0 4px 0 calc(4px + var(--depth, 0) * 13px);
  white-space: nowrap; cursor: default; user-select: none;
}
.ex-row:hover { background: rgba(var(--line-rgb), .06); }
.ex-row[aria-selected="true"] { background: rgba(255, 90, 43, .22); box-shadow: inset 2px 0 0 var(--hot); }
.ex-row[data-drop] { background: rgba(143, 240, 184, .16); box-shadow: inset 0 0 0 1px var(--ok); }
.ex-row[data-dim] { opacity: .5; }
.ex-twist { appearance: none; border: 0; background: none; padding: 0; width: 14px; height: 18px; display: grid; place-items: center; color: var(--faint); cursor: pointer; flex: none; }
.ex-twist svg { width: 9px; height: 9px; transition: transform .1s; }
.ex-row[aria-expanded="true"] .ex-twist svg { transform: rotate(90deg); }
.ex-twist:empty { cursor: default; }
.ex-name { overflow: hidden; text-overflow: ellipsis; min-width: 0; font-size: 12.5px; }
.ex-row .ico { width: 14px; height: 14px; }
.ex-add { appearance: none; border: 0; background: none; cursor: pointer; margin-left: auto; width: 18px; height: 18px; display: none; place-items: center; color: var(--mute); flex: none; }
.ex-add .ico { width: 11px; height: 11px; }
.ex-row:hover .ex-add, .ex-row[aria-selected="true"] .ex-add { display: grid; }
.ex-add:hover { color: var(--text); background: rgba(var(--line-rgb), .14); }
.ex-rename { flex: 1; min-width: 40px; height: 18px; padding: 0 4px; border: 1px solid var(--text); background: var(--ink-deep); font: inherit; font-size: 12.5px; }
.ex-ghost { position: fixed; z-index: 90; padding: 4px 8px; background: var(--hot); color: var(--hot-ink); font: 600 11.5px/1 var(--font-mono); pointer-events: none; white-space: nowrap; }

/* properties */
.pr-cat { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 6px; min-height: 22px; padding: 0 10px; background: var(--ink-deep); border-block: 1px solid var(--hair); font: 600 10px/1 var(--font-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--faint); cursor: pointer; user-select: none; }
.pr-cat:first-child { border-top: 0; }
.pr-cat svg { width: 8px; height: 8px; transform: rotate(90deg); }
.pr-cat[data-closed] svg { transform: none; }
.pr-row { display: grid; grid-template-columns: minmax(0, 41%) minmax(0, 1fr); align-items: center; min-height: 24px; border-bottom: 1px solid rgba(var(--line-rgb), .06); }
.pr-row > label, .pr-row > .pr-name { padding: 0 6px 0 12px; color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.pr-row[data-ro] > .pr-name { color: var(--faint); }
.pr-val { display: flex; align-items: center; gap: 4px; min-width: 0; padding: 2px 8px 2px 0; }
.pr-val input[type="text"], .pr-val input[type="number"], .pr-val select {
  flex: 1; min-width: 0; height: 20px; padding: 0 5px; border: 1px solid transparent; background: transparent;
  font: 500 11.5px/1 var(--font-mono); color: var(--text); text-overflow: ellipsis;
}
.pr-val select { padding-left: 2px; }
.pr-val input:hover, .pr-val select:hover { border-color: var(--hair); }
.pr-val input:focus, .pr-val select:focus { outline: 0; border-color: var(--text); background: var(--ink-deep); }
.pr-val input:disabled, .pr-val select:disabled { color: var(--faint); border-color: transparent; }
.pr-val input[data-bad] { border-color: var(--bad); }
.pr-val .ax { flex: none; font: 600 9.5px/1 var(--font-mono); padding-left: 1px; }
.pr-val .ax--x { color: var(--axis-x); } .pr-val .ax--y { color: var(--axis-y); } .pr-val .ax--z { color: var(--axis-z); }
.pr-swatch { appearance: none; border: 0; padding: 0; cursor: pointer; flex: none; width: 16px; height: 16px; box-shadow: 0 0 0 1px rgba(var(--line-rgb), .5); }
.pr-text { flex: 1; min-width: 0; font: 500 11.5px/1.2 var(--font-mono); color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-left: 5px; }
.pr-link { appearance: none; border: 0; background: none; cursor: pointer; padding: 0 5px; color: var(--hot-soft); font: 500 11.5px/1.2 var(--font-mono); text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pr-link:hover { text-decoration: underline; }
.pr-mini { appearance: none; border: 0; background: none; cursor: pointer; flex: none; width: 18px; height: 18px; display: grid; place-items: center; color: var(--faint); }
.pr-mini:hover { color: var(--text); background: rgba(var(--line-rgb), .12); }
.pr-mini .ico { width: 11px; height: 11px; }
.pr-chips { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 10px; }
.pr-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 7px; box-shadow: inset 0 0 0 1px var(--hair-strong); font: 500 11px/1 var(--font-mono); }
.pr-chip button { appearance: none; border: 0; background: none; color: var(--faint); cursor: pointer; padding: 0; width: 14px; height: 14px; display: grid; place-items: center; }
.pr-chip button:hover { color: var(--text); }
.pr-chip .ico { width: 9px; height: 9px; }
.pr-addrow { display: flex; gap: 4px; padding: 5px 10px 8px; }
.pr-addrow input { flex: 1; min-width: 0; height: 22px; padding: 0 6px; border: 1px solid var(--hair); background: var(--ink-deep); font: 400 11.5px/1 var(--font-mono); }
.pr-addrow input:focus { outline: 0; border-color: var(--text); }
.pr-addrow button { flex: none; }

/* output */
.st-bottom { display: flex; flex-direction: column; min-height: 0; background: var(--ink-mid); }
.out-list { flex: 1; min-height: 0; overflow: auto; padding: 4px 0; font: 400 12px/1.5 var(--font-mono); overscroll-behavior: contain; }
.out-line { display: flex; gap: 10px; padding: 0 12px; white-space: pre-wrap; word-break: break-word; }
.out-line time { flex: none; color: var(--faint); font-variant-numeric: tabular-nums; }
.out-line[data-kind="warn"] { color: var(--warn); }
.out-line[data-kind="error"] { color: var(--bad); }
.out-line[data-kind="info"] { color: #9fe8ff; }
.out-line[data-kind="system"] { color: var(--faint); }
.out-line a { color: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.out-cmd { display: flex; align-items: center; gap: 8px; flex: none; min-height: 28px; padding: 0 10px; border-top: 1px solid var(--hair); background: var(--ink-deep); }
.out-cmd .ico { color: var(--hot-soft); width: 14px; height: 14px; }
.out-cmd input { flex: 1; min-width: 0; height: 26px; border: 0; background: transparent; font: 400 12px/1 var(--font-mono); }
.out-cmd input:focus { outline: 0; }
.out-cmd input::placeholder { color: var(--faint); }

/* toolbox */
.tb-cats { display: flex; gap: 4px; padding: 6px 8px; overflow-x: auto; flex: none; border-bottom: 1px solid var(--hair); scrollbar-width: none; }
.tb-cats::-webkit-scrollbar { display: none; }
.chip { appearance: none; border: 0; cursor: pointer; flex: none; min-height: 24px; padding: 0 9px; background: transparent; color: var(--mute); box-shadow: inset 0 0 0 1px var(--hair); font: 500 11.5px/1 var(--font-mono); white-space: nowrap; }
.chip:hover { color: var(--text); box-shadow: inset 0 0 0 1px var(--hair-strong); }
.chip[aria-pressed="true"] { color: var(--text); background: rgba(255, 90, 43, .14); box-shadow: inset 0 0 0 1px var(--hot); }
.tb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 6px; padding: 8px; }
.tb-card { appearance: none; border: 0; cursor: pointer; padding: 0; background: var(--ink-deep); color: var(--text); box-shadow: inset 0 0 0 1px var(--hair); display: grid; grid-template-rows: auto auto; text-align: left; min-width: 0; }
.tb-card:hover { box-shadow: inset 0 0 0 1px var(--text); }
.tb-thumb { aspect-ratio: 1; display: grid; place-items: center; background:
  linear-gradient(rgba(var(--line-rgb), .06) 1px, transparent 1px) 0 0 / 100% 16px,
  linear-gradient(90deg, rgba(var(--line-rgb), .06) 1px, transparent 1px) 0 0 / 16px 100%, var(--ink); overflow: hidden; }
.tb-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.tb-thumb .ico { width: 22px; height: 22px; color: var(--faint); }
.tb-name { padding: 5px 6px 6px; font: 500 11px/1.25 var(--font-mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-top: 1px solid var(--hair); }

/* assistant */
.as-log { flex: 1; min-height: 0; overflow: auto; padding: 12px 12px 4px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.as-msg { max-width: 100%; font-size: 13px; line-height: 1.5; }
.as-msg--user { align-self: flex-end; max-width: 88%; padding: 7px 10px; background: rgba(var(--line-rgb), .1); box-shadow: inset 0 0 0 1px var(--hair); font-family: var(--font-mono); font-size: 12px; white-space: pre-wrap; word-break: break-word; }
.as-msg--bot { padding-left: 12px; border-left: 2px solid var(--hot); color: var(--text); }
.as-msg--bot p { margin: 0 0 6px; }
.as-msg--bot p:last-child { margin-bottom: 0; }
.as-msg--note { color: var(--faint); font: 400 11.5px/1.5 var(--font-mono); }
.as-steps { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 3px; font: 400 11.5px/1.45 var(--font-mono); color: var(--mute); }
.as-steps li { display: flex; gap: 7px; align-items: baseline; }
.as-steps li::before { content: ""; flex: none; width: 7px; height: 7px; box-shadow: inset 0 0 0 1px var(--hair-strong); transform: translateY(1px); }
.as-steps li[data-state="doing"]::before { background: var(--hot); box-shadow: none; animation: st-pulse .7s ease-in-out infinite alternate; }
.as-steps li[data-state="done"]::before { background: var(--ok); box-shadow: none; }
.as-steps li[data-state="failed"]::before { background: var(--bad); box-shadow: none; }
@keyframes st-pulse { from { opacity: .35; } to { opacity: 1; } }
.as-chips { display: flex; flex-wrap: wrap; gap: 5px; padding: 8px 12px 0; flex: none; }
.as-form { position: relative; flex: none; margin: 10px 12px 12px; border: 1px dashed var(--hair-strong); background: rgba(6, 43, 48, .7); display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; padding: 9px 9px 9px 11px; }
.as-form:focus-within { border-style: solid; border-color: var(--text); }
.as-form textarea { display: block; width: 100%; min-height: 40px; max-height: 140px; margin: 0; padding: 0; border: 0; outline: 0; resize: none; background: transparent; font: 400 12.5px/1.5 var(--font-mono); }
.as-form textarea::placeholder { color: var(--faint); }
.as-form label { position: absolute; left: 9px; top: -7px; padding: 0 6px; background: var(--ink-mid); font: 500 10px/1.2 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.as-foot { flex: none; padding: 0 12px 10px; font: 400 10.5px/1.5 var(--font-mono); color: var(--faint); }
.as-code { margin: 6px 0 0; padding: 8px 10px; background: var(--ink-deep); box-shadow: inset 0 0 0 1px var(--hair); font: 400 11.5px/1.5 var(--font-mono); overflow: auto; max-height: 180px; white-space: pre; tab-size: 2; }

/* ---------------------------------------------------------------- status bar */
.st-status { display: flex; align-items: center; gap: 0; min-height: 24px; background: var(--ink-deep); border-top: 1px solid var(--hair-strong); font: 400 11px/1 var(--font-mono); color: var(--mute); overflow: hidden; white-space: nowrap; }
.st-status > span { padding: 0 11px; border-right: 1px solid var(--hair); min-height: 24px; display: inline-flex; align-items: center; gap: 6px; }
.st-status > .st-status-fill { flex: 1; border-right: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--faint); }
.st-status b { font-weight: 500; color: var(--text); }
.st-status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
body[data-mode="play"] .st-status .dot, body[data-mode="run"] .st-status .dot { background: var(--hot); animation: st-pulse .7s ease-in-out infinite alternate; }

/* ---------------------------------------------------------------- floating layer: menus, dialogs, toasts */
.st-layer { position: fixed; inset: 0; z-index: 80; pointer-events: none; }
.st-layer > * { pointer-events: auto; }
.menu { position: fixed; min-width: 190px; max-width: 320px; max-height: min(74vh, 560px); overflow: auto; padding: 4px 0; background: var(--ink-deep); box-shadow: 0 0 0 1px var(--hair-strong), 0 14px 34px rgba(0, 0, 0, .45); font-size: 12.5px; }
.menu-item { appearance: none; border: 0; background: none; cursor: pointer; width: 100%; display: flex; align-items: center; gap: 9px; min-height: 26px; padding: 0 12px 0 10px; color: var(--text); text-align: left; white-space: nowrap; }
.menu-item:hover, .menu-item[data-active] { background: rgba(255, 90, 43, .2); }
.menu-item:disabled { color: var(--faint); cursor: default; background: none; }
.menu-item .ico { width: 14px; height: 14px; color: var(--mute); }
.menu-item .lead { width: 14px; flex: none; display: grid; place-items: center; }
.menu-item .keys { margin-left: auto; padding-left: 18px; font: 400 11px/1 var(--font-mono); color: var(--faint); }
.menu-item .sub { margin-left: auto; padding-left: 12px; color: var(--faint); }
.menu-item .sub .ico { width: 9px; height: 9px; }
.menu-sep { height: 1px; margin: 4px 0; background: var(--hair); }
.menu-head { padding: 6px 12px 4px; font: 600 9.5px/1 var(--font-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--faint); }
.pop { position: fixed; padding: 10px; background: var(--ink-deep); box-shadow: 0 0 0 1px var(--hair-strong), 0 14px 34px rgba(0, 0, 0, .45); }
.cp { width: 232px; display: grid; gap: 9px; }
.cp-sv { position: relative; height: 132px; cursor: crosshair; touch-action: none; box-shadow: 0 0 0 1px var(--hair); }
.cp-sv i { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .5); pointer-events: none; }
.cp-hue { appearance: none; width: 100%; height: 12px; margin: 0; background: linear-gradient(90deg, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00); cursor: pointer; }
.cp-hue::-webkit-slider-thumb { appearance: none; width: 8px; height: 16px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .5); }
.cp-hue::-moz-range-thumb { width: 8px; height: 16px; border: 0; border-radius: 0; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .5); }
.cp-row { display: flex; align-items: center; gap: 6px; font: 500 11px/1 var(--font-mono); color: var(--faint); }
.cp-row input { flex: 1; min-width: 0; height: 22px; padding: 0 6px; border: 1px solid var(--hair); background: var(--ink-mid); color: var(--text); font: 500 11.5px/1 var(--font-mono); }
.cp-row input:focus { outline: 0; border-color: var(--text); }
.cp-now { width: 22px; height: 22px; flex: none; box-shadow: 0 0 0 1px rgba(var(--line-rgb), .5); }
.cp-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; }
.cp-grid button { appearance: none; border: 0; padding: 0; cursor: pointer; aspect-ratio: 1; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25); }
.cp-grid button:hover { outline: 2px solid var(--text); outline-offset: 0; }
.mats { width: 300px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; max-height: 60vh; overflow: auto; }
.mats button { appearance: none; border: 0; padding: 0; cursor: pointer; background: var(--ink-mid); color: var(--text); box-shadow: inset 0 0 0 1px var(--hair); display: grid; }
.mats button:hover { box-shadow: inset 0 0 0 1px var(--text); }
.mats button[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--hot); }
.mats canvas { width: 100%; aspect-ratio: 1.5; display: block; }
.mats span { padding: 4px 4px 5px; font: 500 10px/1.1 var(--font-mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; }

.scrim { position: fixed; inset: 0; background: rgba(4, 22, 26, .72); display: grid; place-items: center; padding: 20px; z-index: 5; }
.dlg { position: relative; width: min(100%, 560px); max-height: calc(100vh - 40px); display: flex; flex-direction: column; background: var(--ink-mid); box-shadow: 0 0 0 1px var(--hair-strong), 0 24px 60px rgba(0, 0, 0, .5); }
.dlg--wide { width: min(100%, 880px); }
.dlg-head { display: flex; align-items: center; gap: 10px; padding: 12px 10px 12px 18px; border-bottom: 1px solid var(--hair); }
.dlg-head h2 { margin: 0; flex: 1; font: 800 26px/1 var(--font-display); letter-spacing: .012em; text-transform: uppercase; }
.dlg-body { padding: 16px 18px; overflow: auto; color: var(--mute); font-size: 13.5px; line-height: 1.55; }
.dlg-body p { margin: 0 0 10px; }
.dlg-body strong, .dlg-body b { color: var(--text); font-weight: 600; }
.dlg-body code { font: 500 12px/1.4 var(--font-mono); color: var(--hot-soft); }
.dlg-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px 16px; border-top: 1px solid var(--hair); }
.dlg-foot .btn { min-height: 34px; padding: 0 16px; }
.field { display: grid; gap: 5px; margin-bottom: 12px; }
.field > span { font: 500 10.5px/1.2 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.field input[type="text"], .field input[type="number"], .field select, .field textarea { width: 100%; min-height: 30px; padding: 4px 8px; border: 1px solid var(--hair-strong); background: var(--ink-deep); font: 400 13px/1.3 var(--font-mono); }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--text); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.tpl { appearance: none; border: 0; cursor: pointer; padding: 0; background: var(--ink-deep); color: var(--text); text-align: left; box-shadow: inset 0 0 0 1px var(--hair-strong); display: grid; }
.tpl:hover { box-shadow: inset 0 0 0 2px var(--hot); }
.tpl-art { aspect-ratio: 16 / 9; background: var(--ink); display: grid; place-items: center; overflow: hidden; border-bottom: 1px solid var(--hair); }
.tpl-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tpl b { padding: 9px 11px 0; font: 800 20px/1 var(--font-display); letter-spacing: .012em; text-transform: uppercase; }
.tpl span { padding: 4px 11px 11px; font: 400 11.5px/1.45 var(--font-mono); color: var(--mute); }
.keys-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.keys-table td { padding: 5px 0; border-bottom: 1px solid var(--hair); vertical-align: top; }
.keys-table td:first-child { width: 42%; font-family: var(--font-mono); color: var(--hot-soft); white-space: nowrap; }
.keys-table tr:last-child td { border-bottom: 0; }
kbd { font: 500 11px/1 var(--font-mono); padding: 2px 5px; box-shadow: inset 0 0 0 1px var(--hair-strong); }

.toasts { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%); display: grid; gap: 6px; justify-items: center; z-index: 9; pointer-events: none; }
.toast { padding: 8px 12px; background: var(--text); color: var(--ink); font: 500 12px/1.3 var(--font-mono); box-shadow: 0 8px 22px rgba(0, 0, 0, .35); max-width: min(90vw, 520px); animation: toast-in .16s ease-out; }
.toast[data-kind="error"] { background: var(--bad); color: #2a0606; }
.toast[data-kind="ok"] { background: var(--ok); color: #05301a; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }

/* ---------------------------------------------------------------- play mode: HUD over the viewport */
.st-gui { position: absolute; inset: 0; z-index: 4; pointer-events: none; overflow: hidden; }
.st-gui > * { pointer-events: auto; }
.hud { position: absolute; inset: 0; z-index: 6; pointer-events: none; font-family: var(--font-body); }
.hud-health { position: absolute; right: 12px; top: 12px; width: 178px; height: 14px; background: rgba(6, 43, 48, .8); box-shadow: 0 0 0 1px var(--hair-strong); }
.hud-health i { display: block; height: 100%; background: var(--ok); transition: width .15s; }
.hud-health[data-low] i { background: var(--hot); }
.hud-board { position: absolute; right: 12px; top: 36px; min-width: 178px; background: rgba(6, 43, 48, .86); box-shadow: 0 0 0 1px var(--hair-strong); font: 500 12px/1 var(--font-mono); }
.hud-board table { width: 100%; border-collapse: collapse; }
.hud-board th { padding: 6px 9px; text-align: right; font-weight: 500; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); border-bottom: 1px solid var(--hair); }
.hud-board th:first-child, .hud-board td:first-child { text-align: left; }
.hud-board td { padding: 6px 9px; text-align: right; color: var(--text); }
.hud-hint { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); padding: 6px 10px; background: rgba(6, 43, 48, .82); box-shadow: inset 0 0 0 1px var(--hair-strong); font: 500 11px/1.3 var(--font-mono); color: var(--mute); white-space: nowrap; }
.hud-hint b { color: var(--text); font-weight: 600; }
.hud-prompt { position: absolute; transform: translate(-50%, -100%); display: flex; align-items: center; gap: 9px; padding: 7px 11px 7px 7px; background: rgba(6, 43, 48, .92); box-shadow: 0 0 0 1px var(--hair-strong); pointer-events: auto; cursor: pointer; }
.hud-prompt kbd { display: grid; place-items: center; width: 26px; height: 26px; padding: 0; background: var(--hot); color: var(--hot-ink); box-shadow: none; font: 700 13px/1 var(--font-mono); position: relative; }
.hud-prompt kbd[data-hold]::after { content: ""; position: absolute; inset: -3px; border: 2px solid var(--text); clip-path: inset(0 calc(100% - var(--hold, 0%)) 0 0); }
.hud-prompt b { display: block; font: 600 13px/1.2 var(--font-body); color: var(--text); }
.hud-prompt span { display: block; font: 400 11px/1.2 var(--font-mono); color: var(--mute); }
.hud-message { position: absolute; left: 50%; top: 30%; transform: translate(-50%, -50%); max-width: 70%; padding: 16px 22px; background: rgba(6, 43, 48, .9); box-shadow: 0 0 0 1px var(--hair-strong); font: 600 20px/1.3 var(--font-body); text-align: center; }
.hud-hintbar { position: absolute; left: 0; right: 0; top: 0; padding: 6px 12px; background: rgba(4, 22, 26, .88); font: 500 13px/1.3 var(--font-body); text-align: center; }
.hud-toast { position: absolute; right: 12px; bottom: 44px; display: grid; gap: 6px; justify-items: end; }
.hud-toast div { max-width: 280px; padding: 9px 12px; background: rgba(6, 43, 48, .92); box-shadow: 0 0 0 1px var(--hair-strong); }
.hud-toast b { display: block; font: 600 13px/1.25 var(--font-body); }
.hud-toast span { display: block; margin-top: 2px; font: 400 12px/1.35 var(--font-body); color: var(--mute); }
.hud-died { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(120, 10, 10, .22); font: 800 54px/1 var(--font-display); letter-spacing: .04em; text-transform: uppercase; color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .35); }
.hud-stick { position: absolute; left: 22px; bottom: 26px; width: 112px; height: 112px; border-radius: 50%; background: rgba(6, 43, 48, .45); box-shadow: inset 0 0 0 2px rgba(var(--line-rgb), .5); pointer-events: auto; touch-action: none; }
.hud-stick i { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; background: rgba(var(--line-rgb), .8); }
.hud-jump { position: absolute; right: 26px; bottom: 36px; width: 78px; height: 78px; border-radius: 50%; border: 0; background: rgba(6, 43, 48, .5); box-shadow: inset 0 0 0 2px rgba(var(--line-rgb), .5); color: #fff; font: 600 13px/1 var(--font-mono); pointer-events: auto; touch-action: none; }
.hud-bubble { position: absolute; transform: translate(-50%, -100%); max-width: 220px; padding: 6px 10px; border-radius: 12px; background: #fff; color: #111; font: 500 13px/1.3 var(--font-body); text-align: center; }
.bb { position: absolute; transform: translate(-50%, -50%); pointer-events: none; }
.bb > * { pointer-events: auto; }

/* ---------------------------------------------------------------- script editor (CodeMirror) */
.st-code .CodeMirror { flex: 1; height: auto; min-height: 0; background: var(--ink-deep); color: var(--text); font: 400 13px/1.55 var(--font-mono); }
.st-code-bar { display: flex; align-items: center; gap: 10px; flex: none; min-height: 30px; padding: 0 8px 0 12px; border-bottom: 1px solid var(--hair); background: var(--ink-mid); font: 400 11.5px/1 var(--font-mono); color: var(--faint); }
.st-code-bar b { color: var(--text); font-weight: 500; }
.st-code-bar .err { color: var(--bad); }
.CodeMirror-gutters { background: var(--ink-deep); border-right: 1px solid var(--hair); }
.CodeMirror-linenumber { color: var(--faint); padding: 0 8px 0 10px; }
.CodeMirror-cursor { border-left: 2px solid var(--hot); }
.CodeMirror-selected { background: rgba(255, 90, 43, .28) !important; }
.CodeMirror-activeline-background { background: rgba(var(--line-rgb), .05); }
.CodeMirror-matchingbracket { color: var(--text) !important; background: rgba(255, 90, 43, .35); outline: 0; }
.cm-comment { color: var(--faint); font-style: italic; }
.cm-string, .cm-string-2 { color: #ffd9a8; }
.cm-number { color: #ffe58f; }
.cm-keyword { color: var(--hot-soft); }
.cm-atom { color: #ffe58f; }
.cm-builtin { color: #9fe8ff; }
.cm-variable-2 { color: #c9f3e6; }
.cm-def { color: var(--text); }
.cm-operator { color: var(--mute); }
.cm-type { color: #c9a5ff; }
.cm-error-line { background: rgba(255, 143, 143, .14); }
.CodeMirror-hints { z-index: 95; padding: 3px 0; margin: 0; list-style: none; position: absolute; overflow-y: auto; max-height: 220px; background: var(--ink-deep); box-shadow: 0 0 0 1px var(--hair-strong), 0 12px 28px rgba(0, 0, 0, .45); font: 400 12px/1.5 var(--font-mono); border-radius: 0; border: 0; }
.CodeMirror-hint { padding: 1px 10px; color: var(--text); border-radius: 0; }
li.CodeMirror-hint-active { background: rgba(255, 90, 43, .3); color: var(--text); }
.CodeMirror-dialog { background: var(--ink-mid); color: var(--text); border-bottom: 1px solid var(--hair-strong); font: 400 12px/1.4 var(--font-mono); padding: 4px 10px; }
.CodeMirror-dialog input { color: var(--text); font: inherit; }
.CodeMirror-foldgutter { width: 12px; }
.CodeMirror-foldgutter-open, .CodeMirror-foldgutter-folded { color: var(--faint); }
.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler { background: var(--ink-deep); }

/* ---------------------------------------------------------------- embedded in the landing page */
body.is-embed .st-brand span, body.is-embed .st-project, body.is-embed .st-saved, body.is-embed .st-status-fill { display: none; }
body.is-embed .st-top { min-height: 40px; }
body.is-embed .st-ribbon { min-height: 56px; }
body.is-embed .rb-group { padding-bottom: 5px; }
body.is-embed .rb-group > .rb-label { display: none; }
.st-embed-open { display: none; }
body.is-embed .st-embed-open { display: inline-flex; }

/* ---------------------------------------------------------------- narrow windows: docks become drawers */
@media (max-width: 1180px) {
  :root { --dock-left: 280px; --dock-right: 272px; }
}
@media (max-width: 980px) {
  .st-body, .st-body[data-left="off"], .st-body[data-right="off"], .st-body[data-left="off"][data-right="off"] { grid-template-columns: minmax(0, 1fr); position: relative; }
  .st-body > .st-split { display: none; }
  .st-dock--left, .st-dock--right { position: absolute; top: 0; bottom: 0; z-index: 30; width: min(88vw, 330px); box-shadow: 0 0 0 1px var(--hair-strong), 0 0 40px rgba(0, 0, 0, .5); }
  .st-dock--left { left: 0; } .st-dock--right { right: 0; }
  .st-body > .st-center { grid-column: 1; }
  .st-project input { width: 10ch; }
  .st-brand span { display: none; }
}
@media (max-width: 640px) {
  .st-project, .st-saved { display: none; }
  .st-tabsbar button { padding: 0 9px; letter-spacing: .08em; }
  .st-top-actions .btn span { display: none; }
  :root { --dock-bottom: 120px; }
  .st-status > span:not(:first-child):not(.st-status-fill) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .toast, .as-steps li[data-state="doing"]::before, body[data-mode="play"] .st-status .dot { animation: none; }
}
