/* SuperWXR editor stylesheet — the FastShaders chrome recipes (reset,
   controls, popovers, menus, modals, tooltips, seams) applied to floating
   panels over a 3D viewport. Values are FastShaders' own; classes are fs-*. */

/* ---------------------------------------------------------------- reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html,
body,
#app {
  height: 100%;
  width: 100%;
  overflow: hidden;
}
body {
  font-family: var(--font-sans);
  font-size: var(--font-size-md);
  color: var(--text-primary);
  background: var(--bg-app);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
  -webkit-user-select: none;
}
:where(input, textarea, [contenteditable]:not([contenteditable='false']), pre, code, .cm-editor) {
  user-select: text;
  -webkit-user-select: text;
}
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
  border: none;
  background: none;
}
a {
  color: inherit;
  text-decoration: none;
}
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-panel);
}
::-webkit-scrollbar-thumb {
  background: var(--border-default);
  border-radius: 0;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--border-strong);
}
.fs-strip {
  overflow-x: auto;
  scrollbar-width: none;
}
.fs-strip::-webkit-scrollbar {
  display: none;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0s !important;
    scroll-behavior: auto !important;
  }
}
input[type='checkbox'],
input[type='radio'] {
  accent-color: var(--border-focus);
}
:focus-visible {
  outline: 1px solid var(--border-focus);
  outline-offset: 2px;
}

/* ------------------------------------------------------------- layout */
#app {
  position: fixed;
  inset: 0;
  background: var(--viewport-bg);
}
#viewport {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  outline: none;
  touch-action: none;
}
#ui {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
#ui > * {
  pointer-events: auto;
}
#boot-fallback {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  padding: 2rem;
  font: 14px/1.5 var(--font-sans);
  color: var(--text-primary);
  background: var(--bg-app);
}
#boot-fallback pre {
  margin-top: 1rem;
  font: 11px/1.4 var(--font-mono);
  white-space: pre-wrap;
  color: var(--danger-text);
}
:root.fs-dragging,
:root.fs-dragging * {
  cursor: inherit !important;
}
:root.fs-dragging iframe {
  pointer-events: none;
}

/* ------------------------------------------------------------ buttons */
.fs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: var(--ctl-size);
  font-family: var(--font-sans);
  font-size: var(--font-size-sm);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--border-radius-sm);
  padding: 0 12px;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: border-color var(--transition-fast), color var(--transition-fast), background var(--transition-fast);
}
.fs-btn:hover {
  border-color: var(--border-focus);
  color: var(--border-focus);
  background: var(--bg-panel);
}
.fs-btn:disabled,
.fs-btn[aria-disabled='true'] {
  opacity: 0.5;
  cursor: default;
  color: var(--text-primary);
  background: var(--bg-surface);
  border-color: var(--border-subtle);
}
.fs-btn--quiet {
  font-weight: 600;
  letter-spacing: 0;
  padding: 0 10px;
  background: var(--bg-panel);
}
.fs-btn--quiet:hover:not(:disabled) {
  border-color: var(--text-accent);
  color: var(--text-accent);
  background: var(--bg-panel);
}
.fs-btn--primary {
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
  background: var(--text-accent);
  border: 1px solid var(--text-accent);
  padding: 0 14px;
  transition: filter var(--transition-fast);
}
.fs-btn--primary:hover {
  color: #fff;
  background: var(--text-accent);
  border-color: var(--text-accent);
  filter: brightness(1.1);
}
.fs-btn--yes {
  font-weight: 700;
  color: #1a1a1a;
  background: var(--yes-bg);
  border-color: var(--yes-border);
  min-width: 72px;
}
.fs-btn--yes:hover:not(:disabled) {
  color: #1a1a1a;
  background: var(--yes-bg-hover);
  border-color: var(--yes-border-hover);
}
.fs-btn--invert {
  padding: 0 10px;
  background: var(--text-primary);
  color: var(--bg-surface);
  border-color: var(--text-primary);
}
.fs-btn--invert:hover {
  background: var(--border-focus);
  border-color: var(--border-focus);
  color: #fff;
}
.fs-btn--icon {
  width: var(--ctl-size);
  height: var(--ctl-size);
  padding: 0;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  transition: border-color var(--transition-fast), color var(--transition-fast), background var(--transition-fast), opacity var(--transition-fast);
}
.fs-btn--icon:hover:not(:disabled) {
  border-color: var(--border-focus);
  color: var(--border-focus);
  background: var(--bg-surface);
}
.fs-btn--icon:disabled {
  opacity: 0.35;
  cursor: default;
}
.fs-btn--icon svg {
  display: block;
  width: 16px;
  height: 16px;
  fill: currentColor;
}
.fs-btn--toggle[aria-pressed='true'] {
  color: var(--text-primary);
  border-color: var(--border-focus);
  background: rgba(0, 0, 0, 0.04);
}
:root[data-theme='dark'] .fs-btn--toggle[aria-pressed='true'] {
  background: rgba(255, 255, 255, 0.06);
}
.fs-btn--alert {
  min-width: 30px;
  padding: 0 10px;
  color: #fff;
  background: var(--danger);
  border-color: var(--danger);
}
.fs-btn--alert:hover {
  color: #fff;
  background: var(--danger-hover);
  border-color: var(--danger-hover);
}
.fs-btn--text {
  height: auto;
  padding: var(--space-1) var(--space-2);
  border: 1px solid transparent;
  background: none;
  font-weight: 400;
  letter-spacing: 0;
}
.fs-btn--text:hover {
  background: none;
  border-color: transparent;
}
.fs-btn--text.fs-btn--cancel {
  color: var(--danger);
}
.fs-btn--text.fs-btn--cancel:hover:not(:disabled) {
  text-decoration: underline;
}
.fs-btn--sm {
  height: 22px;
  padding: 0 8px;
  font-size: var(--font-size-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.fs-seg-group {
  display: inline-flex;
}
.fs-seg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--ctl-size);
  padding: 0 12px;
  font-size: var(--font-size-sm);
  font-weight: 600;
  line-height: 1;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  position: relative;
}
.fs-seg + .fs-seg {
  border-left: none;
}
.fs-seg:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.02);
}
:root[data-theme='dark'] .fs-seg:hover {
  background: rgba(255, 255, 255, 0.05);
}
.fs-seg--active,
.fs-seg[aria-pressed='true'] {
  color: var(--text-primary);
  background: var(--bg-panel);
  border-color: var(--border-strong);
}
.fs-chip {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 1px var(--space-2);
  font-size: var(--font-size-xs);
  font-weight: 600;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  white-space: nowrap;
}
.fs-chip--on {
  color: #fff;
  background: var(--border-focus);
  border-color: var(--border-focus);
}

/* ------------------------------------------------------------- inputs */
.fs-input,
.fs-field {
  font-family: var(--font-sans);
  font-size: var(--font-size-sm);
  color: var(--text-primary);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--border-radius-sm);
  transition: border-color var(--transition-fast), background var(--transition-fast);
}
.fs-input {
  height: var(--ctl-size);
  font-weight: 600;
  border-color: var(--border-default);
  padding: 0 var(--space-3);
}
.fs-field {
  padding: 6px 8px;
}
.fs-input:hover,
.fs-field:hover {
  border-color: var(--border-focus);
}
.fs-input:focus,
.fs-field:focus {
  outline: none;
  border-color: var(--border-focus);
}
.fs-input::placeholder,
.fs-field::placeholder {
  color: var(--text-muted);
}
.fs-textarea {
  width: 100%;
  min-height: 90px;
  padding: 8px;
  resize: vertical;
  line-height: 1.5;
  font-family: var(--font-mono);
  font-size: var(--font-size-xs);
}
.fs-select {
  height: 22px;
  max-width: 100%;
  padding: 0 4px;
  font-family: var(--font-sans);
  font-size: var(--font-size-xs);
  color: var(--text-primary);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  outline: none;
}
.fs-select:hover,
.fs-select:focus {
  border-color: var(--border-focus);
}
.fs-select--ctl {
  height: var(--ctl-size);
  font-size: var(--font-size-sm);
  padding: 0 6px;
  background: var(--bg-panel);
}
.fs-check {
  width: 14px;
  height: 14px;
  margin: 0;
  cursor: pointer;
}
/* the ◂ value ▸ number field — a TEXT input underneath, never type=number */
.fs-num {
  display: inline-flex;
  align-items: center;
  width: 90px;
  height: 24px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--border-radius-sm);
  background: var(--bg-input);
  overflow: hidden;
  user-select: none;
}
.fs-num:hover {
  border-color: var(--border-default);
}
.fs-num--narrow {
  width: 64px;
}
.fs-num__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 100%;
  font-size: 9px;
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
  background: transparent;
  border: none;
  padding: 0;
  line-height: 1;
}
.fs-num__arrow:hover {
  background: rgba(var(--node-ink-rgb), 0.08);
  color: var(--text-primary);
}
.fs-num__arrow:active {
  background: rgba(var(--node-ink-rgb), 0.14);
}
.fs-num__value {
  flex: 1;
  min-width: 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-xs);
  font-family: var(--font-mono);
  color: var(--text-primary);
  cursor: ew-resize;
  padding: 0 2px;
  white-space: nowrap;
  overflow: hidden;
}
.fs-num__value--dragging {
  background: rgba(var(--node-ink-rgb), 0.04);
}
.fs-num__edit {
  width: 100%;
  height: 100%;
  border: none;
  outline: none;
  background: var(--bg-input);
  font-size: var(--font-size-xs);
  font-family: var(--font-mono);
  color: var(--text-primary);
  text-align: center;
  padding: 0 2px;
}
:root[data-theme='dark'] .fs-num__arrow:hover {
  background: rgba(255, 255, 255, 0.08);
}
:root[data-theme='dark'] .fs-num__arrow:active {
  background: rgba(255, 255, 255, 0.14);
}
@media (pointer: coarse) {
  .fs-num {
    height: 32px;
  }
  .fs-num__arrow {
    width: 28px;
    font-size: 12px;
  }
}
.fs-vec {
  display: flex;
  flex: 1 1 auto;
  gap: 4px;
  min-width: 0;
}
.fs-vec__axis {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1 1 0;
  min-width: 0;
}
.fs-vec .fs-num--narrow { /* the three share the column instead of running past it */
  flex: 1 1 0;
  width: auto;
  min-width: 0;
}
.fs-vec__axis > span {
  width: 9px;
  font-size: 9px;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
}
.fs-swatch {
  width: 26px;
  height: 14px;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.35);
  border-radius: 0;
  cursor: pointer;
  flex-shrink: 0;
}
.fs-hex {
  width: 64px;
  font-family: var(--font-mono);
  font-size: var(--font-size-xs);
  padding: 2px 4px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
}
.fs-hex:focus {
  outline: none;
  border-color: var(--border-focus);
}

/* ----------------------------------------------------------- typography */
.fs-eyebrow {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.fs-section-title {
  font-size: var(--font-size-sm);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.fs-muted {
  color: var(--text-muted);
}
.fs-mono {
  font-family: var(--font-mono);
}
.fs-note {
  font-size: 10px;
  line-height: 1.5;
  color: var(--text-secondary);
}
.fs-danger-text {
  color: var(--danger-text);
}

/* ------------------------------------------------------- floating panel */
.fs-panel {
  position: absolute;
  display: flex;
  flex-direction: column;
  min-width: 180px;
  max-width: calc(100vw - 16px);
  background: var(--bg-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-float);
  z-index: var(--z-controls);
  color: var(--text-primary);
  font-size: var(--font-size-sm);
}
.fs-panel--transient {
  z-index: calc(var(--z-controls) + 2);
}
.fs-panel--active {
  z-index: calc(var(--z-controls) + 1);
  border-color: var(--border-default);
}
.fs-panel__head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  height: var(--ctl-size);
  padding: 0 var(--space-2) 0 var(--space-3);
  background: var(--bg-raised-sub);
  border-bottom: 1px solid var(--border-subtle);
  cursor: grab;
  flex-shrink: 0;
}
.fs-panel__head:active {
  cursor: grabbing;
}
.fs-panel__title {
  flex: 1;
  min-width: 0;
  font-size: var(--font-size-sm);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fs-panel__head-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.fs-panel__body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}
.fs-panel__foot {
  flex-shrink: 0;
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-1) var(--space-2);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
/* the bottom seam: a 2px line with a 10px hit zone and the mockup's short grip bar */
.fs-panel__seam {
  position: relative;
  height: var(--fs-seam);
  background: var(--edge-color);
  cursor: row-resize;
  flex-shrink: 0;
}
.fs-panel__seam::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--fs-seam-hit) / -2 + var(--fs-seam) / 2);
  height: var(--fs-seam-hit);
}
.fs-panel__seam::after {
  content: '';
  position: absolute;
  left: 50%;
  top: calc(-1 * var(--fs-seam));
  width: 28px;
  height: calc(var(--fs-seam) * 2 + 2px);
  margin-left: -14px;
  background: var(--text-primary);
  pointer-events: none;
}
.fs-panel__seam:hover,
.fs-panel--resizing .fs-panel__seam {
  background: var(--border-focus);
}
.fs-panel__seam:hover::after,
.fs-panel--resizing .fs-panel__seam::after {
  background: var(--border-focus);
}
.fs-panel__pin img,
.fs-props__pin img {
  display: block;
  width: 14px;
  height: 14px;
  margin: auto;
}
.fs-props__top {
  display: flex;
  gap: 4px;
  padding: 4px 8px;
  border-bottom: 1px solid var(--border-subtle);
}
.fs-props__pin {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.fs-props__pin img {
  margin: 0;
}
.fs-props__pin[aria-pressed='true'] {
  border-color: var(--border-focus);
}
.fs-budget {
  position: absolute;
  left: calc(100% + 8px);
  bottom: -1px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  height: 37px;
  padding: 0 8px;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: var(--font-size-xs);
  color: var(--text-primary);
  background: var(--bg-raised);
  border: 1px solid var(--border-subtle);
}
.fs-budget__row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.fs-budget__name {
  font-weight: 700;
  color: var(--text-secondary);
  white-space: nowrap;
}
.fs-budget__value {
  min-width: 9ch; /* "4.5 / 100" to "100 / 100": the names after it line up */
  text-align: right;
}
.fs-budget__row[hidden] {
  display: none;
}
.fs-budget__check {
  display: inline-block;
  width: 14px;
  color: var(--border-focus);
}
.fs-budget__bar {
  width: 48px;
  height: 6px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
}
.fs-budget__fill {
  display: block;
  height: 100%;
  background: var(--play);
}
.fs-budget__row[data-level='near'] .fs-budget__fill { background: var(--type-color); }
.fs-budget__row[data-level='over'] .fs-budget__fill { background: var(--danger); }
.fs-budget__row[data-level='over'] .fs-budget__value { color: var(--danger-text); }
.fs-panel__pin[aria-pressed='true'] {
  color: var(--border-focus);
  border-color: var(--border-focus);
}
.fs-panel__xbtn {
  width: 20px;
  height: 20px;
  padding: 0;
  font-size: 12px;
  line-height: 1;
  color: var(--text-secondary);
  border: 1px solid transparent;
}
.fs-panel__xbtn:hover {
  color: var(--border-focus);
  border-color: var(--border-subtle);
  background: var(--bg-panel);
}
.fs-panel__xbtn[aria-pressed='true'] {
  color: var(--border-focus);
  border-color: var(--border-focus);
}
.fs-empty {
  padding: var(--space-3);
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  line-height: 1.5;
}

/* ------------------------------------------------------------- toolbox */
.fs-toolbox {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
}
.fs-toolbox__group {
  display: flex;
  align-items: center;
  gap: 4px;
}
.fs-toolbox__group + .fs-toolbox__group {
  padding-left: 8px;
  margin-left: 4px;
  border-left: 1px solid var(--border-subtle);
}
.fs-tool {
  width: var(--ctl-size);
  height: var(--ctl-size);
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--border-radius-sm);
  transition: border-color var(--transition-fast), color var(--transition-fast), background var(--transition-fast);
}
.fs-tool svg {
  display: block;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.fs-tool:hover:not(:disabled) {
  border-color: var(--border-focus);
  color: var(--border-focus);
}
.fs-tool[aria-pressed='true'] {
  color: #fff;
  background: var(--text-accent);
  border-color: var(--text-accent);
}
.fs-tool[aria-pressed='true']:hover {
  color: #fff;
}
.fs-tool:disabled {
  opacity: 0.35;
  cursor: default;
}
.fs-tool--wide {
  width: auto;
  padding: 0 10px;
  font-size: var(--font-size-sm);
  font-weight: 700;
  letter-spacing: 0.04em;
}
.fs-tool--play,
.fs-tool--play:hover:not(:disabled) {
  color: #fff;
  background: var(--play);
  border-color: var(--play);
}
.fs-tool--play[aria-pressed='true'],
.fs-tool--play[aria-pressed='true']:hover:not(:disabled) {
  background: var(--danger);
  border-color: var(--danger);
}

/* ------------------------------------------------------------- compass */
#ui > .fs-corner .fs-compass {
  position: relative;
  margin-left: -4px;
  width: 96px;
  height: 96px;
  pointer-events: none;
}
.fs-compass__lines {
  position: absolute;
  inset: 0;
}
.fs-compass__line {
  stroke-width: 2;
}
.fs-compass__line--x { stroke: var(--axis-x); }
.fs-compass__line--y { stroke: var(--axis-y); }
.fs-compass__line--z { stroke: var(--axis-z); }
.fs-compass__axis {
  position: absolute;
  left: 0;
  top: 0;
  width: 18px;
  height: 18px;
  padding: 0;
  font-size: var(--font-size-xs);
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  color: #fff;
  border: 1px solid transparent;
  pointer-events: auto;
  cursor: pointer;
}
.fs-compass__axis:hover,
.fs-compass__axis[aria-pressed='true'] {
  border-color: #fff;
}
.fs-compass__axis--x { background: var(--axis-x); }
.fs-compass__axis--y { background: var(--axis-y); }
.fs-compass__axis--z { background: var(--axis-z); }
.fs-compass__axis--back {
  width: 12px;
  height: 12px;
  opacity: 0.55;
}
.fs-compass__axis--back:hover {
  opacity: 1;
}
.fs-compass__persp {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 18px;
  height: 18px;
  padding: 0;
  font-size: var(--font-size-xs);
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  color: var(--text-primary);
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  pointer-events: auto;
  cursor: pointer;
  z-index: 30;
}

/* ------------------------------------------------------------ outliner */
.fs-outliner {
  min-width: 200px;
}
.fs-outliner__bar {
  position: sticky; /* frozen with the header: only the tree scrolls under it */
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-raised-sub);
}
.fs-outliner__bar .fs-btn--icon {
  width: 22px;
  height: 22px;
  font-size: 12px;
}
.fs-tree {
  padding: 4px 0;
}
.fs-tree__row {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding-right: 6px;
  font-size: var(--font-size-sm);
  color: var(--text-primary);
  cursor: default;
  white-space: nowrap;
  border: 1px solid transparent;
}
.fs-tree__row:hover {
  background: var(--bg-surface-hover);
}
.fs-tree__row--drop-into {
  outline: 1px dotted var(--border-focus);
  outline-offset: -2px;
}
.fs-tree__row--drop-before {
  box-shadow: 0 -2px 0 var(--border-focus);
}
.fs-tree__row--drop-after {
  box-shadow: 0 2px 0 var(--border-focus);
}
.fs-tree__row--hidden .fs-tree__name {
  color: var(--text-muted);
}
.fs-tree__row--locked .fs-tree__name {
  font-style: italic;
}
.fs-tree__caret {
  width: 14px;
  height: 14px;
  padding: 0;
  font-size: 9px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.fs-tree__caret:hover {
  color: var(--text-primary);
}
.fs-tree__icon {
  width: 14px;
  font-size: 11px;
  color: var(--text-secondary);
  text-align: center;
  flex-shrink: 0;
}
.fs-tree__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fs-tree__name input {
  width: 100%;
  height: 18px;
  padding: 0 4px;
  font: inherit;
  background: var(--bg-input);
  border: 1px solid var(--border-focus);
  outline: none;
}
.fs-tree__tags {
  font-size: 9px;
  color: var(--text-muted);
  white-space: nowrap;
}
.fs-tree__open {
  width: 18px;
  height: 18px;
  padding: 0;
  font-size: 10px;
  color: var(--text-muted);
  opacity: 0;
}
.fs-tree__row:hover .fs-tree__open,
.fs-tree__row[aria-selected='true'] .fs-tree__open {
  opacity: 1;
}
.fs-tree__open:hover {
  color: var(--border-focus);
}
.fs-tree__row[aria-selected='true'] {
  color: #fff;
  background: var(--text-accent);
}
.fs-tree__row[aria-selected='true'] * {
  color: #fff;
}
.fs-tree__row[aria-selected='true'] input {
  color: var(--text-primary); /* a rename: the field keeps its own plate */
}

/* ---------------------------------------------------------- properties */
.fs-props {
  min-width: 260px;
}
.fs-props__entity {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--border-subtle);
}
.fs-props__entity .fs-input {
  flex: 1;
  min-width: 0;
  height: 24px;
  padding: 0 8px;
}
.fs-comp {
  border-bottom: 1px solid var(--border-subtle);
}
.fs-comp__head {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 6px 0 8px;
  background: var(--bg-raised-sub);
  cursor: pointer;
}
.fs-comp__head:hover {
  background: var(--bg-surface-hover);
}
.fs-comp__caret {
  width: 12px;
  font-size: 9px;
  color: var(--text-muted);
}
.fs-comp__title {
  flex: 1;
  min-width: 0;
  font-size: var(--font-size-sm);
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fs-comp__summary {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}
.fs-children {
  flex-shrink: 0;
}
.fs-children img {
  display: block;
  width: 14px;
  height: 14px;
  margin: auto;
}
.fs-panel__xbtn.fs-children[aria-pressed='true'] {
  border-color: var(--success-text);
}
.fs-comp--locked .fs-children {
  opacity: 0.55;
}
.fs-comp__noremove {
  flex-shrink: 0;
  width: 20px; /* a header with no ✕ keeps its padlock in line with the others */
}
.fs-comp--disabled .fs-comp__body,
.fs-comp--locked .fs-comp__body {
  opacity: 0.55;
}
/* The padlock: boxes, so the VR plates draw it too. Open, the shackle stands off to the side. */
.fs-lock {
  position: relative;
  flex-shrink: 0;
  color: var(--text-muted);
}
.fs-lock__shackle,
.fs-lock__body {
  position: absolute;
  display: block;
  box-sizing: border-box;
}
.fs-lock__shackle {
  left: 6px;
  top: 3px;
  width: 7px;
  height: 7px;
  border: 2px solid currentColor;
  border-bottom: none;
}
.fs-lock__body {
  left: 4px;
  top: 9px;
  width: 11px;
  height: 8px;
  background: currentColor;
}
.fs-lock[aria-pressed='false'] .fs-lock__shackle {
  left: 10px;
  top: 2px;
}
.fs-comp__body {
  padding: 4px 0;
}
.fs-comp__error {
  margin: 4px 12px;
  padding: 4px 8px;
  font-size: var(--font-size-xs);
  font-family: var(--font-mono);
  color: var(--danger-text);
  background: rgba(231, 76, 60, 0.12);
  white-space: pre-wrap;
  word-break: break-word;
}
.fs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  min-height: 26px;
}
.fs-row__label {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}
.fs-row__field {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 1;
  min-width: 0;
  max-width: 70%;
}
.fs-row:has(> .fs-row__field > .fs-vec) .fs-row__label {
  flex: 0 0 auto; /* "Size", then the axes take the rest */
}
.fs-row .fs-row__label--short,
.fs-row:has(> .fs-row__field > .fs-vec) .fs-row__label--short {
  flex: 0 0 12px; /* P R S: one narrow column, so the axes of every row line up */
  font-weight: 700;
  cursor: help;
}
.fs-row__field:has(> .fs-vec) {
  flex: 1 1 auto;
  max-width: none;
}
.fs-row--disabled {
  opacity: 0.45;
}
.fs-asset-pick {
  display: flex;
  gap: 4px;
  min-width: 0;
}
.fs-row__field .fs-asset-pick .fs-select {
  width: 104px;
  min-width: 0;
}
.fs-row__field .fs-field,
.fs-row__field .fs-select {
  width: 140px;
}
.fs-row__field .fs-field--wide {
  width: 170px;
}
.fs-props__add {
  padding: var(--space-2) var(--space-3);
  display: flex;
  gap: var(--space-2);
}
.fs-props__add .fs-btn {
  flex: 1;
}

/* ----------------------------------------------------------- assets bar */
.fs-assets {
  min-width: 320px;
}
.fs-assets .fs-panel__body {
  display: flex;
  overflow: hidden; /* each side scrolls for itself: the tabs up and down, the tiles sideways */
}
.fs-assets__layout {
  flex: 1;
  display: flex;
  min-width: 0;
  min-height: 0;
}
.fs-assets__tabs {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  border-right: 1px solid var(--border-subtle);
  background: var(--bg-raised-sub);
}
.fs-assets__tab {
  flex-shrink: 0;
  height: 22px;
  padding: 0 10px;
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--text-secondary);
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}
.fs-assets__tab:hover {
  color: var(--text-primary);
  background: var(--bg-surface-hover);
}
.fs-assets__tab[aria-selected='true'] {
  color: var(--text-primary);
  background: var(--bg-raised);
  box-shadow: inset 2px 0 0 var(--border-focus);
}
.fs-assets__strip {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
.fs-assets__strip::-webkit-scrollbar {
  display: none;
}
.fs-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: calc(64px * var(--tile-scale, 1));
  flex-shrink: 0;
  cursor: grab;
  padding: 4px 2px;
  border: 1px solid transparent;
}
.fs-tile:hover {
  border-color: var(--border-subtle);
  background: var(--bg-panel);
}
.fs-tile__pic {
  width: calc(44px * var(--tile-scale, 1));
  height: calc(36px * var(--tile-scale, 1));
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--node-bg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-node);
  overflow: hidden;
  font-size: 18px;
  color: var(--text-secondary);
}
.fs-tile__pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.fs-tile__pic svg {
  width: calc(30px * var(--tile-scale, 1));
  height: calc(30px * var(--tile-scale, 1));
  fill: none;
  stroke: #2b2b2b;
  stroke-width: 1.2;
}
:root[data-theme='dark'] .fs-tile__pic svg {
  stroke: #eceef0;
}
.fs-tile__name {
  width: 100%;
  font-size: 9px;
  line-height: 1.2;
  text-align: center;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fs-tile__size {
  font-size: 8px;
  color: var(--text-muted);
}

/* ----------------------------------------------------- search / menus */
.fs-menu {
  position: fixed;
  z-index: var(--z-menu);
  background: var(--bg-panel);
  border: 1px solid var(--border-default);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-float);
  overflow: hidden;
  min-width: 260px;
  max-height: min(520px, calc(100vh - 16px));
  max-width: calc(100vw - 16px);
  display: flex;
  flex-direction: column;
  --font-size-xs: 12px;
  --font-size-sm: 14px;
  --font-size-md: 16px;
}
.fs-menu--search {
  width: 300px;
}
.fs-menu__search {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  background: var(--bg-input);
  border: none;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: var(--font-size-sm);
  outline: none;
}
.fs-menu__search::placeholder {
  color: var(--text-muted);
}
.fs-menu__searchrow {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-input);
}
.fs-menu__searchrow .fs-menu__search {
  border-bottom: none;
  flex: 1;
}
.fs-menu__mic {
  width: 32px;
  height: 100%;
  align-self: stretch;
  font-size: 14px;
  color: var(--text-muted);
  border-left: 1px solid var(--border-subtle);
}
.fs-menu__mic:hover {
  color: var(--border-focus);
}
.fs-menu__mic[aria-pressed='true'] {
  color: #fff;
  background: var(--danger);
}
.fs-menu__list {
  overflow-y: auto;
  overflow-x: auto;
  flex: 1;
  min-height: 0;
}
.fs-menu__category {
  padding: var(--space-1) var(--space-3);
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--bg-app);
  position: sticky;
  top: 0;
  z-index: 1;
}
.fs-menu__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-2) var(--space-3);
  font-size: var(--font-size-sm);
  color: var(--text-primary);
  transition: background var(--transition-fast);
  text-align: left;
  overflow-wrap: break-word;
}
.fs-menu__item > span:first-child {
  min-width: 0;
}
.fs-menu__item:hover {
  background: var(--bg-surface-hover);
}
.fs-menu__item--focused,
.fs-menu__item--focused:hover {
  background: var(--bg-surface-hover);
  box-shadow: inset 2px 0 0 var(--border-focus);
}
.fs-menu__item--danger {
  color: var(--menu-danger);
}
.fs-menu__item--danger:hover {
  background: rgba(231, 76, 60, 0.1);
}
.fs-menu__item[aria-disabled='true'] {
  opacity: 0.4;
  cursor: default;
}
.fs-menu__item[aria-disabled='true']:hover {
  background: none;
}
.fs-menu__item-category {
  flex: none;
  white-space: nowrap;
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}
.fs-menu__item-key {
  flex: none;
  font-family: var(--font-mono);
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}
.fs-menu__divider {
  height: 1px;
  background: var(--border-subtle);
  margin: var(--space-1) 0;
}
.fs-menu__empty {
  padding: var(--space-2) var(--space-3);
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}
@media (pointer: coarse) {
  .fs-menu {
    min-width: 300px;
  }
  .fs-menu__item {
    padding: var(--space-3) var(--space-4);
    font-size: var(--font-size-md);
  }
  .fs-menu__search {
    padding: var(--space-3) var(--space-3);
    font-size: var(--font-size-md);
  }
}

/* -------------------------------------------------------------- modal */
.fs-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  background: var(--bg-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}
.fs-modal {
  width: min(440px, 92vw);
  max-height: min(88vh, 760px);
  overflow-y: auto;
  background: var(--bg-panel);
  border: 1px solid var(--border-default);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.fs-modal--wide {
  width: min(680px, 94vw);
}
.fs-modal__title {
  font-size: var(--font-size-sm);
  font-weight: 700;
}
.fs-modal__message {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  line-height: 1.5;
  white-space: pre-line;
}
.fs-modal__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.fs-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.fs-modal__footer .fs-btn {
  font-weight: 400;
  letter-spacing: 0;
}
.fs-modal__footer .fs-btn--yes {
  font-weight: 700;
}
.fs-modal__footer .fs-btn--outline-primary {
  border-color: var(--border-focus);
  color: var(--border-focus);
  font-weight: 600;
}
.fs-modal__row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--font-size-sm);
}
.fs-modal__row label {
  flex: 1;
  color: var(--text-secondary);
}
.fs-modal__checkrow {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 10px;
  color: var(--text-secondary);
  line-height: 1.4;
}
.fs-modal__checkrow input {
  margin: 2px 0 0;
  flex: none;
}
.fs-kv {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
}
.fs-kv b {
  color: var(--text-primary);
  font-weight: 600;
}
.fs-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.fs-qr canvas {
  width: 220px;
  height: 220px;
  image-rendering: pixelated;
  background: #fff;
  border: 1px solid var(--border-subtle);
}
.fs-qr__url {
  font-family: var(--font-mono);
  font-size: var(--font-size-xs);
  user-select: all;
  word-break: break-all;
  text-align: center;
}

/* ------------------------------------------------------------- tooltip */
.fs-tooltip {
  white-space: pre-line;
  position: fixed;
  z-index: var(--z-tooltip);
  max-width: 260px;
  padding: 5px 9px;
  background: var(--text-primary);
  color: var(--bg-panel);
  font-size: var(--font-size-xs);
  font-weight: 500;
  line-height: 1.4;
  box-shadow: var(--shadow-md);
  pointer-events: none;
  opacity: 0;
  transition: opacity 80ms ease-out;
}
.fs-tooltip--shown {
  opacity: 1;
}

/* ---------------------------------------------------------- status bar */
.fs-status {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 22px;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0 var(--space-3);
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  background: var(--bg-raised);
  border-top: 1px solid var(--border-subtle);
  pointer-events: auto;
  white-space: nowrap;
  overflow: hidden;
}
.fs-status__text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fs-status__error {
  color: var(--danger-text);
  font-family: var(--font-mono);
}
.fs-status .fs-chip {
  height: 16px;
}

/* -------------------------------------------------------- drop overlay */
.fs-drop-veil {
  position: absolute;
  inset: 0;
  z-index: var(--z-menu);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(51, 102, 204, 0.12);
  outline: 2px dashed var(--border-focus);
  outline-offset: -8px;
  pointer-events: none;
}
.fs-drop-veil__note {
  padding: 8px 14px;
  font-size: var(--font-size-sm);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-primary);
  background: var(--bg-panel);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-float);
}

/* --------------------------------------------------------- code panel */
.fs-code {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.fs-code__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: 4px var(--space-2);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}
.fs-code__name {
  display: inline-flex;
  align-items: center;
  height: var(--ctl-size);
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.fs-code__actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.fs-code__bar .fs-code__name {
  flex: 1;
  min-width: 0;
}
.fs-code__main {
  display: flex;
  min-height: 0;
}
.fs-code [hidden] {
  display: none; /* a button's or a name's own display would otherwise beat the attribute */
}
.fs-code__tree {
  width: 190px;
  flex-shrink: 0;
  overflow: auto;
  padding: 4px 0;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
}
.fs-code__folder,
.fs-code__file {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  height: 24px;
  padding: 0 8px;
  border: none;
  background: none;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: var(--font-size-xs);
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.fs-code__folder {
  font-family: var(--font-sans, inherit);
  font-weight: 600;
  color: var(--text-primary);
}
.fs-code__caret {
  width: 10px;
  color: var(--text-muted);
}
.fs-code__file {
  display: block;
  padding-left: 22px;
  line-height: 24px;
}
.fs-code__file:hover,
.fs-code__folder:hover {
  background: rgba(var(--node-ink-rgb), 0.05);
  color: var(--text-primary);
}
.fs-code__file--hit {
  color: var(--border-focus);
  background: rgba(0, 0, 255, 0.07);
}
.fs-code__file--error {
  color: var(--danger-text);
}
.fs-code__file[aria-selected='true'] {
  color: var(--text-primary);
  background: var(--bg-input);
  box-shadow: inset 2px 0 0 var(--border-focus);
}
.fs-code__none {
  padding: 2px 8px 4px 22px;
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}
.fs-seg--alert {
  color: var(--danger-text);
}
.fs-debug {
  overflow: auto;
  background: var(--bg-input);
  font-family: var(--font-mono);
  font-size: var(--font-size-xs);
}
.fs-debug__line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 3px 8px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}
.fs-debug__line--error {
  color: var(--danger-text);
  background: rgba(231, 76, 60, 0.08);
}
.fs-debug__line--log {
  color: var(--text-primary);
}
.fs-debug__time {
  flex-shrink: 0;
  color: var(--text-muted);
}
.fs-debug__who {
  flex-shrink: 0;
  padding: 0;
  border: none;
  background: none;
  color: var(--border-focus);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.fs-debug__text {
  flex: 1;
  min-width: 0;
  white-space: pre-wrap;
  word-break: break-word;
}
.fs-debug__count {
  flex-shrink: 0;
  color: var(--text-muted);
}
.fs-code__editor {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
.fs-code__editor .cm-editor {
  height: 100%;
  font-size: 12px;
  font-family: var(--font-mono);
  background: var(--bg-input);
  color: var(--text-primary);
}
.fs-code__editor .cm-scroller {
  font-family: var(--font-mono);
}
.fs-code__editor .cm-gutters {
  background: var(--bg-surface);
  color: var(--text-muted);
  border-right: 1px solid var(--border-subtle);
}
.fs-code__editor .cm-activeLine,
.fs-code__editor .cm-activeLineGutter {
  background: rgba(var(--node-ink-rgb), 0.04);
}
.fs-code__editor .cm-editor.cm-focused {
  outline: none;
}
.fs-code__status {
  padding: 2px var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--font-size-xs);
  color: var(--danger-text);
  background: rgba(231, 76, 60, 0.12);
  white-space: pre-wrap;
  word-break: break-word;
}

/* --------------------------------------------------------- timeline */
.fs-anim {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.fs-anim__bar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 4px var(--space-2);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
  flex-wrap: wrap;
}
.fs-anim__canvas {
  flex: 1;
  min-height: 120px;
  display: block;
  width: 100%;
  cursor: crosshair;
}
.fs-anim__time {
  font-family: var(--font-mono);
  font-size: var(--font-size-xs);
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
  min-width: 64px;
}

/* --------------------------------------------------------- shader panel */
.fs-assets__scale {
  width: 90px;
  height: 14px;
  accent-color: var(--border-focus);
}
.fs-tree__row--scene .fs-tree__name {
  font-weight: 700;
}
.fs-effect {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px 2px 12px;
  border-top: 1px solid var(--border-subtle);
}
.fs-effect__name {
  font-size: var(--font-size-xs);
  font-weight: 700;
  color: var(--text-secondary);
}
.fs-shader__target {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}
.fs-shader__target .fs-select {
  width: auto;
  max-width: 240px;
}
.fs-shader__none {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  background: var(--bg-raised);
  color: var(--text-secondary);
}
.fs-shader {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.fs-shader__frame {
  flex: 1;
  min-height: 0;
  border: none;
  width: 100%;
  background: var(--bg-app);
}
.fs-shader__note {
  padding: var(--space-3);
  font-size: var(--font-size-sm);
  line-height: 1.5;
  color: var(--text-secondary);
}
.fs-shader__note code {
  font-family: var(--font-mono);
  font-size: var(--font-size-xs);
  background: var(--bg-surface-hover);
  padding: 1px 4px;
}

/* ------------------------------------------------------------ brand */
.fs-corner {
  position: absolute;
  left: 12px;
  top: 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  pointer-events: none;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.45); /* hard, no blur: legible on a light sky */
}
.fs-brand {
  font-size: var(--font-size-md, 14px);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-primary);
}
.fs-brand__version {
  font-family: var(--font-mono);
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  margin-top: 2px;
}
.fs-corner__buttons {
  display: flex;
  gap: 4px;
  margin: 8px 0 4px;
  pointer-events: auto;
}
.fs-corner__buttons .fs-btn {
  padding: 0 6px;
  text-shadow: none;
}

/* ------------------------------------------------- Get app menu (the desktop app) */
.fs-menu--app {
  width: 320px;
}
.fs-menu--app .fs-menu__category {
  display: flex;
  justify-content: space-between;
  position: static;
}
.fs-menu--app .fs-menu__category > span + span {
  text-transform: none; /* the version: v0.1.0, not V0.1.0 */
  font-family: var(--font-mono);
}
a.fs-menu__item {
  text-decoration: none;
}
.fs-menu__note {
  padding: var(--space-2) var(--space-3);
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
  line-height: 1.4;
}
.fs-menu__note--unsigned {
  color: var(--text-secondary); /* how to open an unsigned build: read before the first start */
}
