/* Blender web recreation — Blender 4.x dark theme */
/* ===== base ===== */
:root {
  --c-window: #161616;
  --c-topbar: #1d1d1d;
  --c-statusbar: #1d1d1d;
  --c-editor: #303030;
  --c-header: #303030;
  --c-header-line: #232323;
  --c-panel: #383838;
  --c-panel-head: #3d3d3d;
  --c-widget: #545454;
  --c-widget-hi: #65656d;
  --c-widget-press: #4772b3;
  --c-text: #e5e5e5;
  --c-text-dim: #a0a0a0;
  --c-text-disabled: #727272;
  --c-menu-bg: #181818;
  --c-menu-hover: #4772b3;
  --c-select: #4772b3;
  --c-orange: #ff8c19;
  --c-line: #232323;
  --round: 6px;
  --round-sm: 4px;
}
html { font-size: 12px; }
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; overflow: hidden; }
body {
  font-family: Inter, "DejaVu Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 1em;
  color: var(--c-text);
  background: var(--c-window);
  user-select: none;
  -webkit-user-select: none;
  cursor: default;
}
button { font: inherit; color: inherit; background: none; border: none; padding: 0; cursor: default; }
input, textarea { font: inherit; }
.flex-spacer { flex: 1 1 auto; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #2b2b2b; }
::-webkit-scrollbar-thumb { background: #545454; border-radius: 5px; border: 2px solid #2b2b2b; }
::-webkit-scrollbar-thumb:hover { background: #65656d; }
::-webkit-scrollbar-corner { background: #2b2b2b; }

#app { display: flex; flex-direction: column; height: 100vh; }
#topbar { flex: 0 0 auto; background: var(--c-topbar); border-bottom: 1px solid #0d0d0d; }
#main { flex: 1 1 auto; position: relative; overflow: hidden; background: var(--c-editor); }
#statusbar-host { flex: 0 0 auto; }

/* ===== icons ===== */
.bl-icon { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; flex: 0 0 auto; }
.bl-icon svg { width: 100%; height: 100%; display: block; }
.bl-icon.tiny, .bl-icon-btn.tiny .bl-icon { width: 12px; height: 12px; }

/* ===== topbar ===== */
.topbar-inner { display: flex; align-items: center; height: 27px; padding: 0 6px; gap: 2px; }
.topbar-logo { width: 20px; height: 20px; margin: 0 4px; display: flex; align-items: center; border-radius: 3px; }
.topbar-logo svg { width: 18px; height: 18px; }
.topbar-logo:hover { background: #ffffff14; }
.bl-menubar-btn {
  display: inline-flex; align-items: center; gap: 5px;
  height: 20px; padding: 0 8px; border-radius: 3px; color: var(--c-text); font-size: 1em;
}
.bl-menubar-btn:hover, .bl-menubar-btn.open { background: #ffffff17; }
.bl-menubar-btn.icon-only { padding: 0 4px; }
.bl-menubar-btn .caret { font-size: 9px; opacity: .7; margin-left: -2px; }
.topbar-tabs { display: flex; align-items: stretch; height: 100%; margin-left: 12px; }
.ws-tab {
  display: flex; align-items: center; padding: 0 12px; font-size: 1em; color: var(--c-text-dim);
  border-top: 2px solid transparent; background: transparent;
}
.ws-tab:hover { color: var(--c-text); background: #ffffff0d; }
.ws-tab.active { color: var(--c-text); background: var(--c-editor); border-top-color: var(--c-select); }
.ws-tab.plus { padding: 0 7px; color: var(--c-text-dim); }
.ws-tab.plus:hover { color: var(--c-text); background: #ffffff14; border-radius: 3px; }
.topbar-right { display: flex; align-items: center; gap: 6px; margin-left: 14px; }

/* ===== menus ===== */
.bl-menu {
  position: fixed; z-index: 5000; min-width: 170px;
  background: var(--c-menu-bg); border: 1px solid #2e2e2e; border-radius: var(--round-sm);
  padding: 4px 0; box-shadow: 0 6px 22px rgba(0,0,0,.55);
  animation: menu-in .08s ease-out;
}
@keyframes menu-in { from { opacity: .4; transform: translateY(-2px); } to { opacity: 1; transform: none; } }
.bl-menu-sep { height: 1px; background: #333; margin: 4px 8px; }
.bl-menu-item {
  display: flex; align-items: center; gap: 7px; padding: 3px 12px 3px 9px; min-height: 20px;
  font-size: 1em; color: var(--c-text); position: relative;
}
.bl-menu-item .bl-icon { width: 14px; height: 14px; opacity: .9; }
.bl-menu-item .bl-menu-label { flex: 1 1 auto; white-space: nowrap; }
.bl-menu-item.disabled { color: var(--c-text-disabled); }
.bl-menu-item.disabled .bl-icon { opacity: .35; }
.bl-menu-item:not(.disabled):hover, .bl-menu-item.focus { background: var(--c-menu-hover); color: #fff; }
.bl-menu-item.danger:not(.disabled):hover { background: #b3373a; }
.bl-menu-shortcut { color: var(--c-text-dim); font-size: .92em; margin-left: 18px; }
.bl-menu-item:not(.disabled):hover .bl-menu-shortcut, .bl-menu-item.focus .bl-menu-shortcut { color: #dfe7f5; }
.bl-menu-check { width: 12px; display: inline-flex; }
.bl-menu-check .bl-icon { width: 11px; height: 11px; }
.bl-menu-item .bl-icon.sub { margin-left: 4px; }
.menu-group { font-size: .92em; color: var(--c-text-dim); text-transform: none; }
.bl-search-menu { padding: 0; }
.bl-search-input {
  width: 100%; background: #101010; border: none; border-bottom: 1px solid #2e2e2e;
  color: var(--c-text); padding: 6px 10px; outline: none; border-radius: var(--round-sm) var(--round-sm) 0 0;
}
.bl-search-list { max-height: 280px; overflow-y: auto; padding: 3px 0; }

/* ===== tooltips ===== */
.bl-tooltip {
  position: fixed; z-index: 6000; pointer-events: none; max-width: 260px;
  background: #161616; border: 1px solid #2f2f2f; border-radius: 3px;
  padding: 6px 9px; font-size: 1em; box-shadow: 0 4px 14px rgba(0,0,0,.5);
}
.tt-title { color: #fff; }
.tt-row { display: flex; gap: 8px; color: #b8b8b8; font-size: .95em; margin-top: 2px; }
.tt-row span:first-child::after { content: ':'; }
.tt-key { color: #d6d6d6; }
.tt-desc { color: #b0b0b0; font-size: .95em; margin-top: 3px; max-width: 240px; }

/* ===== area layout ===== */
.bl-split { display: flex; min-width: 0; min-height: 0; width: 100%; height: 100%; }
.bl-split.h { flex-direction: row; }
.bl-split.v { flex-direction: column; }
.bl-split-child { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.bl-splitter { flex: 0 0 6px; background: var(--c-window); z-index: 30; position: relative; }
.bl-splitter.h { cursor: col-resize; }
.bl-splitter.v { cursor: row-resize; }
.bl-splitter:hover, .bl-splitter.drag { background: var(--c-select); }
.bl-area { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--c-editor); }
.bl-area-header {
  flex: 0 0 26px; display: flex; align-items: center; gap: 2px; padding: 0 4px;
  background: var(--c-header); border-bottom: 1px solid var(--c-header-line); overflow: hidden; position: relative; z-index: 20;
}
.bl-area.active .bl-area-header { background: #353535; }
.bl-area-type-btn { width: 22px; height: 20px; display: flex; align-items: center; justify-content: center; border-radius: 3px; flex: 0 0 auto; }
.bl-area-type-btn .bl-icon { width: 16px; height: 16px; }
.bl-area-type-btn:hover { background: #ffffff17; }
.bl-area-header-content { display: flex; align-items: center; gap: 3px; flex: 1 1 auto; overflow: hidden; height: 100%; }
.bl-area-body { flex: 1 1 auto; position: relative; min-height: 0; min-width: 0; overflow: hidden; }
.bl-area-corner {
  position: absolute; width: 9px; height: 9px; z-index: 60; opacity: 0; cursor: crosshair;
  background:
    linear-gradient(135deg, transparent 0 5px, #8f8f8f 5px 6px, transparent 6px) no-repeat;
}
.bl-area-corner.tl { top: 0; left: 0; transform: rotate(90deg); }
.bl-area-corner.tr { top: 0; right: 0; transform: rotate(180deg); }
.bl-area-corner.bl { bottom: 0; left: 0; }
.bl-area-corner.br { bottom: 0; right: 0; transform: rotate(-90deg); }
.bl-area:hover .bl-area-corner { opacity: .9; }
.bl-area-action-overlay { position: fixed; inset: 0; z-index: 4000; }
.bl-area-action-hint {
  position: absolute; left: 50%; top: 18px; transform: translateX(-50%);
  background: #161616; border: 1px solid #2f2f2f; padding: 4px 12px; border-radius: 3px; color: var(--c-text);
}
.bl-area-preview { z-index: 70; background: rgba(255, 255, 255, 0.13); pointer-events: none; }
.bl-area-preview.join { background: rgba(71, 114, 179, 0.35); }
.bl-join-arrow { position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; transform: translate(-50%, -50%); background: #4772b3; clip-path: polygon(0 35%, 55% 35%, 55% 15%, 100% 50%, 55% 85%, 55% 65%, 0 65%); }

/* ===== widgets ===== */
.bl-num {
  position: relative; display: flex; align-items: center; height: 19px; min-width: 64px;
  background: var(--c-widget); border-radius: var(--round-sm); padding: 0 8px; font-size: .98em;
  overflow: hidden; flex: 0 0 auto;
}
.bl-num:hover { background: var(--c-widget-hi); }
.bl-num-val { white-space: nowrap; }
.bl-num:focus-within, .bl-num:focus { outline: 1px solid var(--c-select); }
.bl-num-arrows { position: absolute; right: 3px; top: 0; bottom: 0; display: none; align-items: center; gap: 1px; }
.bl-num-arrows .bl-icon { width: 9px; height: 9px; opacity: .85; }
.bl-num:hover .bl-num-arrows { display: flex; }
.bl-num-input {
  position: absolute; inset: 0; background: #1c1c1c; border: 1px solid var(--c-select);
  color: #fff; border-radius: var(--round-sm); padding: 0 6px; outline: none; text-align: left;
}
.bl-vec3 { display: flex; flex-direction: column; gap: 2px; width: 100%; }
.bl-vec3-item { display: flex; align-items: center; gap: 0; width: 100%; }
.bl-vec3-ax { width: 12px; text-align: center; font-size: .88em; font-weight: 600; z-index: 2; }
.bl-vec3-item .bl-num { flex: 1 1 auto; padding-left: 18px; margin-left: -14px; }
.bl-check {
  width: 15px; height: 15px; border-radius: 3px; background: var(--c-widget); display: inline-flex;
  align-items: center; justify-content: center; flex: 0 0 auto;
}
.bl-check:hover { background: var(--c-widget-hi); }
.bl-check.on { background: #678b48; }
.bl-check.on .bl-icon { width: 11px; height: 11px; color: #fff; }
.bl-slider {
  position: relative; height: 19px; background: var(--c-widget); border-radius: var(--round-sm);
  overflow: hidden; display: flex; align-items: center; justify-content: flex-end; padding-right: 7px;
  flex: 1 1 auto; min-width: 60px; font-size: .98em;
}
.bl-slider:hover { background: var(--c-widget-hi); }
.bl-slider-fill { position: absolute; left: 0; top: 0; bottom: 0; background: #5d7a52; }
.bl-slider-val { position: relative; }
.bl-color { width: 44px; height: 19px; border-radius: var(--round-sm); border: 1px solid #00000055; overflow: hidden; }
.bl-color:hover { outline: 1px solid #ffffff55; }
.bl-select {
  display: inline-flex; align-items: center; gap: 5px; height: 19px; padding: 0 7px;
  background: var(--c-widget); border-radius: var(--round-sm); font-size: .98em; overflow: hidden;
}
.bl-select:hover { background: var(--c-widget-hi); }
.bl-select-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bl-select .bl-icon.sel { width: 9px; height: 9px; opacity: .8; margin-left: 2px; }
.bl-enum-row { display: inline-flex; border-radius: var(--round-sm); overflow: hidden; }
.bl-enum-item {
  display: inline-flex; align-items: center; justify-content: center; height: 19px; padding: 0 6px;
  background: var(--c-widget); border-right: 1px solid #2e2e2e; min-width: 24px;
}
.bl-enum-item:last-child { border-right: none; }
.bl-enum-item .bl-icon { width: 13px; height: 13px; }
.bl-enum-item:hover, .bl-enum-item.hover { background: var(--c-widget-hi); }
.bl-enum-item.on { background: #4772b3; }
.bl-icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 19px;
  border-radius: var(--round-sm);
}
.bl-icon-btn .bl-icon { width: 14px; height: 14px; }
.bl-icon-btn:hover { background: var(--c-widget-hi); }
.bl-icon-btn.on { background: #4772b3; }
.bl-icon-btn.tiny { width: 18px; height: 16px; }
.bl-icon-btn.disabled { opacity: .45; }
.bl-text-input {
  height: 19px; background: var(--c-widget); border: none; border-radius: var(--round-sm);
  color: var(--c-text); padding: 0 7px; outline: none; min-width: 60px; width: 100%;
}
.bl-text-input:focus { outline: 1px solid var(--c-select); background: #1c1c1c; }
.bl-text-input.wide { width: 100%; }
.bl-btn {
  height: 22px; padding: 0 12px; background: var(--c-widget); border-radius: var(--round-sm);
  color: var(--c-text); display: inline-flex; align-items: center; gap: 6px; font-size: 1em;
}
.bl-btn:hover { background: var(--c-widget-hi); }
.bl-btn.primary { background: var(--c-select); color: #fff; }
.bl-btn.primary:hover { background: #5680c2; }
.bl-btn.danger:hover { background: #b3373a; }
.bl-btn.small { height: 19px; padding: 0 9px; font-size: .95em; }
.bl-btn-row { display: flex; gap: 6px; margin-top: 6px; }
.bl-empty-note { color: var(--c-text-dim); font-size: .95em; padding: 4px 0; font-style: italic; }
.bl-empty-wrap { display: flex; justify-content: center; padding: 10px 0; }

/* option rows */
.bl-opt-row { display: flex; align-items: flex-start; gap: 8px; padding: 1px 0; min-height: 21px; }
.bl-opt-row.sub { padding-left: 14px; }
.bl-opt-label { flex: 0 0 43%; color: var(--c-text); padding-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bl-opt-ctrl { flex: 1 1 auto; display: flex; gap: 4px; align-items: center; min-width: 0; }
.bl-axis-row { display: flex; gap: 8px; align-items: center; }
.axis-label { color: var(--c-text-dim); }

/* panels */
.bl-panel { margin: 0 0 6px; }
.bl-panel-head {
  display: flex; align-items: center; gap: 6px; height: 23px; padding: 0 10px;
  background: var(--c-panel); border-radius: var(--round); cursor: default;
}
.bl-panel-head:hover { background: #3f3f3f; }
.bl-panel-chev .bl-icon { width: 10px; height: 10px; transition: transform .12s; }
.bl-panel.open > .bl-panel-head .bl-panel-chev .bl-icon { transform: rotate(90deg); }
.bl-panel-title { font-weight: 600; font-size: .98em; }
.bl-panel-body { display: none; padding: 6px 12px 8px; background: var(--c-panel); border-radius: 0 0 var(--round) var(--round); margin-top: 1px; }
.bl-panel.open > .bl-panel-body { display: block; }

/* pie menus */
.bl-pie-overlay { position: fixed; inset: 0; z-index: 5200; }
.bl-pie { position: absolute; transform: translate(-50%, -50%); width: 0; height: 0; }
.bl-pie::before {
  content: ''; position: absolute; left: -34px; top: -34px; width: 68px; height: 68px;
  border-radius: 50%; background: rgba(24, 24, 24, 0.85); border: 1px solid #2e2e2e;
}
.bl-pie-item {
  position: absolute; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 6px;
  background: var(--c-menu-bg); border: 1px solid #2e2e2e; border-radius: var(--round-sm);
  padding: 4px 10px; white-space: nowrap; animation: menu-in .1s ease-out; z-index: 2;
}
.bl-pie-item.hot { background: var(--c-menu-hover); color: #fff; }
.bl-pie-item.disabled { opacity: .4; }

/* ===== viewport ===== */
.vp-wrap { position: absolute; inset: 0; }
.vp-canvas, .vp-overlay { position: absolute; inset: 0; width: 100%; height: 100%; }
.vp-overlay { pointer-events: none; }
.vp-nogl { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--c-text-dim); }
.vp-gizmo-wrap { position: absolute; top: 6px; right: 6px; display: flex; flex-direction: column; align-items: center; gap: 4px; z-index: 10; }
.vp-gizmo { cursor: grab; }
.vp-gizmo-btns { display: flex; flex-direction: column; gap: 2px; }
.vp-gizmo-btn {
  width: 24px; height: 20px; display: flex; align-items: center; justify-content: center;
  background: rgba(24, 24, 24, 0.72); border-radius: 3px; border: 1px solid #ffffff12;
}
.vp-gizmo-btn .bl-icon { width: 13px; height: 13px; }
.vp-gizmo-btn:hover { background: #4772b3; }
.vp-gizmo-btn.active { background: #4772b3; }
.vp-toolbar {
  position: absolute; left: 6px; top: 46px; bottom: 6px; z-index: 12;
  display: flex; flex-direction: column; gap: 1px; padding: 4px 3px;
  background: rgba(24, 24, 24, 0.78); border-radius: var(--round-sm); overflow-y: auto; scrollbar-width: none;
}
.vp-toolbar::-webkit-scrollbar { display: none; }
.vp-toolbar.hidden { display: none; }
.vp-tool { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border-radius: 4px; }
.vp-tool .bl-icon { width: 19px; height: 19px; }
.vp-tool:hover { background: #ffffff17; }
.vp-tool.active { background: var(--c-select); }
.vp-toolbar-sep { height: 1px; margin: 3px 4px; background: #ffffff22; }
.vp-sidebar {
  position: absolute; right: 0; top: 0; bottom: 0; width: 218px; z-index: 11;
  background: var(--c-panel); border-left: 1px solid var(--c-line);
  display: flex; flex-direction: column;
}
.vp-sidebar.hidden { display: none; }
.vp-sidebar-tabs { display: flex; background: var(--c-header); border-bottom: 1px solid var(--c-header-line); }
.vp-sidebar-tab { flex: 1; text-align: center; padding: 5px 0; color: var(--c-text-dim); font-size: .95em; }
.vp-sidebar-tab:hover { color: var(--c-text); background: #ffffff0d; }
.vp-sidebar-tab.active { color: #fff; background: var(--c-panel); box-shadow: inset 0 2px 0 var(--c-select); }
.vp-sidebar-content { flex: 1; overflow-y: auto; padding: 8px; }
.vp-modal-readout { color: #fff; margin-left: 10px; font-size: .98em; text-shadow: 0 1px 2px #0008; white-space: nowrap; }
.vp-mode-btn .bl-icon { width: 14px; height: 14px; }
.vp-selmode { margin-left: 6px; }
.vp-shading { margin-left: 6px; }
.vp-shading .bl-enum-item { min-width: 27px; }
.vp-shading .bl-icon { width: 14px; height: 14px; }
.vp-shading .shade-drop { margin-left: 0; }
.vp-shading .shade-drop .bl-icon { width: 8px; height: 8px; }

/* ===== outliner ===== */
.outliner-body { position: absolute; inset: 0; overflow-y: auto; padding: 3px 0 8px; }
.outliner-row {
  display: flex; align-items: center; gap: 4px; height: 19px; padding: 0 6px;
  font-size: .98em; white-space: nowrap; color: var(--c-text);
}
.outliner-row:hover { background: #ffffff0e; }
.outliner-row.selected { background: #4772b355; }
.outliner-row.active { background: #4772b380; }
.outliner-row.group { color: var(--c-text); }
.outliner-row.indent1 { padding-left: 22px; }
.outliner-row.indent2 { padding-left: 40px; }
.outliner-row.indent3 { padding-left: 58px; color: var(--c-text-dim); }
.outliner-row.hidden-obj { opacity: .5; }
.outliner-label { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; }
.outliner-toggle { width: 18px; height: 16px; display: inline-flex; align-items: center; justify-content: center; opacity: 0; flex: 0 0 auto; }
.outliner-toggle.off { opacity: 1; color: var(--c-text-dim); }
.outliner-row:hover .outliner-toggle { opacity: 1; }
.outliner-toggle .bl-icon { width: 13px; height: 13px; }
.outliner-toggle:hover { background: #ffffff1c; border-radius: 3px; }
.outliner-spacer { flex: 1 1 auto; }
.outliner-disc-spacer { width: 15px; flex: 0 0 auto; }
.outliner-row .bl-icon.disc { width: 10px; height: 10px; color: #b8b8b8; }
.outliner-row:hover .bl-icon.disc { color: #fff; }
.outliner-rename {
  background: #1c1c1c; border: 1px solid var(--c-select); color: #fff; border-radius: 3px;
  padding: 0 4px; height: 17px; outline: none; flex: 1 1 auto; min-width: 40px;
}
.outliner-search { display: flex; align-items: center; gap: 4px; position: relative; }
.outliner-search .bl-icon { position: absolute; left: 5px; width: 11px; height: 11px; opacity: .6; }
.outliner-search-input {
  height: 18px; width: 140px; background: var(--c-widget); border: none; border-radius: 3px;
  color: var(--c-text); padding: 0 6px 0 20px; outline: none;
}
.outliner-search-input:focus { background: #1c1c1c; outline: 1px solid var(--c-select); }

/* ===== properties ===== */
.props-tabs {
  flex: 0 0 auto; width: 34px; background: var(--c-header); border-right: 1px solid var(--c-header-line);
  display: flex; flex-direction: column; align-items: center; padding: 4px 0; gap: 1px; overflow-y: auto; scrollbar-width: none;
}
.props-tabs::-webkit-scrollbar { display: none; }
.props-tab { width: 26px; height: 24px; display: flex; align-items: center; justify-content: center; border-radius: 4px; }
.props-tab .bl-icon { width: 16px; height: 16px; }
.props-tab:hover { background: #ffffff17; }
.props-tab.active { background: var(--c-select); }
.props-content { flex: 1 1 auto; overflow-y: auto; padding: 8px 10px 16px; }
.bl-render-bar { display: flex; gap: 6px; margin-bottom: 8px; }
.bl-render-btn { height: 26px; padding: 0 14px; background: var(--c-select); color: #fff; border-radius: var(--round-sm); font-weight: 600; }
.bl-render-btn:hover { background: #5680c2; }
.bl-mod-add { display: flex; justify-content: center; padding: 6px 0 10px; }
.bl-mod-head { display: flex; align-items: center; gap: 6px; flex: 1 1 auto; }
.props-search { width: 150px; }

/* ===== timeline ===== */
.tl-canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; }
.tl-btn { width: 22px; height: 19px; display: inline-flex; align-items: center; justify-content: center; border-radius: 3px; }
.tl-btn .bl-icon { width: 13px; height: 13px; }
.tl-btn:hover { background: var(--c-widget-hi); }
.tl-sep { width: 1px; height: 14px; background: #ffffff22; margin: 0 5px; }
.tl-label { color: var(--c-text-dim); margin: 0 2px 0 6px; }

/* ===== text editor ===== */
.text-editor { position: absolute; inset: 0; display: flex; background: #232323; }
.text-gutter {
  flex: 0 0 42px; overflow: hidden; text-align: right; padding: 6px 8px 6px 0;
  color: #727272; font-family: ui-monospace, Menlo, monospace; font-size: 1em; line-height: 1.45;
  background: #232323; border-right: 1px solid var(--c-line); white-space: pre;
}
.text-input {
  flex: 1 1 auto; background: #232323; color: var(--c-text); border: none; outline: none; resize: none;
  padding: 6px 10px; font-family: ui-monospace, Menlo, monospace; font-size: 1em; line-height: 1.45;
  white-space: pre; overflow: auto;
}
.text-controls { display: flex; align-items: center; gap: 3px; }

/* ===== info ===== */
.info-list { position: absolute; inset: 0; overflow-y: auto; padding: 4px 0; }
.info-row { display: flex; align-items: center; gap: 7px; padding: 2px 10px; font-size: .97em; }
.info-row:hover { background: #ffffff0d; }
.info-row .bl-icon { width: 12px; height: 12px; }
.info-row.type-info .bl-icon { color: #9a9a9a; }
.info-row.type-warning .bl-icon { color: #d8c04a; }
.info-row.type-error .bl-icon { color: #e05656; }
.info-msg { color: var(--c-text); }

/* ===== console ===== */
.console-list { flex: 1 1 auto; overflow-y: auto; padding: 6px 10px; font-family: ui-monospace, Menlo, monospace; font-size: 1em; }
.console-line { color: var(--c-text); white-space: pre-wrap; line-height: 1.4; }
.console-line.in { color: #ffd86e; }
.console-input-row { display: flex; align-items: center; gap: 7px; padding: 4px 10px; }
.console-prompt { color: #ffd86e; font-family: ui-monospace, Menlo, monospace; }
.console-input {
  flex: 1 1 auto; background: transparent; border: none; outline: none; color: var(--c-text);
  font-family: ui-monospace, Menlo, monospace;
}
/* console area uses column flex: wrap in body via area body */
.bl-area-body:has(.console-list) { display: flex; flex-direction: column; }

/* ===== node editor ===== */
.node-svg { position: absolute; inset: 0; width: 100%; height: 100%; background: #262626; }
.node-svg .node rect:first-child { fill: #393939; }
.node.selected rect:first-child { stroke: var(--c-orange); stroke-width: 1.6; }
.node text { fill: #e5e5e5; font-size: 11px; font-family: Inter, sans-serif; }
.node .socket-label { fill: #b8b8b8; font-size: 10px; }
.node .socket-value { fill: #fff; font-size: 9.5px; }
.node-link { stroke: #a1a1a1; stroke-width: 1.6; fill: none; }
.node-link.selected { stroke: var(--c-orange); }
.node-link.dragging { stroke: #d0d0d0; stroke-dasharray: 4 3; }
.node-widget { cursor: ew-resize; }
.node-widget.color { stroke: #00000088; }

/* ===== image editor ===== */
.img-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ===== statusbar ===== */
.statusbar {
  display: flex; align-items: center; height: 23px; background: var(--c-statusbar);
  border-top: 1px solid #0d0d0d; padding: 0 10px; font-size: .95em; color: var(--c-text-dim);
}
.statusbar.hidden { display: none; }
.statusbar-left { flex: 1 1 auto; display: flex; align-items: center; gap: 14px; overflow: hidden; white-space: nowrap; }
.statusbar-right { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.sb-chip { display: inline-flex; align-items: center; gap: 5px; }
.sb-kbd {
  background: #3d3d3d; border: 1px solid #262626; border-radius: 3px; padding: 0 5px;
  font-size: .9em; color: var(--c-text); line-height: 1.5;
}
.sb-stat { color: var(--c-text-dim); }
.sb-sep { width: 1px; height: 12px; background: #3d3d3d; }
.status-flash { color: #fff; }
.status-hint { color: var(--c-text); }
.modal-readout { color: #fff; font-weight: 600; }

/* ===== splash ===== */
.splash-overlay { position: fixed; inset: 0; z-index: 5500; background: rgba(0, 0, 0, 0.42); display: flex; align-items: center; justify-content: center; }
.splash {
  width: 548px; max-width: 94vw; background: #252525; border-radius: 8px; overflow: hidden;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .6);
  animation: splash-in .14s ease-out;
}
@keyframes splash-in { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
.splash-art-wrap { position: relative; height: 250px; }
.splash-art { width: 100%; height: 100%; display: block; object-fit: cover; }
.splash-logo { position: absolute; top: 14px; left: 16px; width: 64px; height: 64px; filter: drop-shadow(0 2px 8px rgba(0,0,0,.5)); }
.splash-logo svg { width: 100%; height: 100%; }
.splash-version { position: absolute; left: 16px; bottom: 10px; color: #fff; font-size: 1.9em; font-weight: 700; text-shadow: 0 1px 6px #000a; }
.splash-body { display: flex; padding: 14px 18px 10px; gap: 24px; }
.splash-col { flex: 1 1 50%; }
.splash-h { color: var(--c-text-dim); font-size: .95em; margin-bottom: 6px; }
.splash-link { color: var(--c-text); padding: 3px 0; cursor: pointer; font-size: 1.05em; }
.splash-link:hover { color: #7fb1e8; }
.splash-links-row { display: flex; gap: 18px; margin-top: 10px; }
.splash-link.small { font-size: .92em; color: var(--c-text-dim); }
.splash-recent { color: var(--c-text); padding: 3px 0; cursor: pointer; font-size: .98em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.splash-recent:hover { color: #7fb1e8; }
.splash-recent.empty { color: var(--c-text-dim); cursor: default; font-style: italic; }
.splash-recent.action { color: var(--c-text-dim); margin-top: 8px; }
.splash-foot { display: flex; justify-content: space-between; padding: 10px 18px 14px; color: #8f8f8f; font-size: .9em; }
.splash-foot-right { color: #8f8f8f; }

/* ===== dialogs ===== */
.bl-dlg-overlay { position: fixed; inset: 0; z-index: 6000; background: rgba(0, 0, 0, .45); display: flex; align-items: center; justify-content: center; }
.bl-dlg {
  background: #303030; border-radius: var(--round); border: 1px solid #444;
  box-shadow: 0 14px 50px rgba(0, 0, 0, .6); max-width: 92vw; max-height: 86vh; display: flex; flex-direction: column;
  animation: splash-in .12s ease-out;
}
.bl-dlg-head { padding: 12px 16px 0; }
.bl-dlg-title { font-size: 1.15em; font-weight: 600; }
.bl-dlg-body { padding: 8px 16px 14px; overflow-y: auto; }
.bl-dlg-msg { color: var(--c-text); line-height: 1.5; margin-top: 4px; }
.bl-dlg-msg.small { font-size: .95em; color: var(--c-text-dim); }
.bl-dlg-buttons { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.fb-nav { display: flex; align-items: center; gap: 6px; padding: 4px 0 8px; color: var(--c-text-dim); }
.fb-nav .bl-icon { width: 13px; height: 13px; }
.fb-nav .bl-icon.back.flip { transform: scaleX(-1); }
.fb-path { color: var(--c-text); background: var(--c-widget); padding: 2px 8px; border-radius: 3px; font-size: .95em; }
.fb-cols { display: flex; gap: 10px; min-height: 170px; }
.fb-side { flex: 0 0 150px; border-right: 1px solid var(--c-line); padding-right: 8px; }
.fb-main { flex: 1 1 auto; }
.fb-item { display: flex; align-items: center; gap: 6px; padding: 3px 6px; border-radius: 3px; color: var(--c-text); font-size: .98em; }
.fb-item .bl-icon { width: 13px; height: 13px; opacity: .8; }
.fb-item:hover { background: #ffffff14; }
.fb-name-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.fb-name-label { color: var(--c-text-dim); flex: 0 0 auto; }
.prefs-tabs { display: flex; gap: 2px; flex-wrap: wrap; padding: 4px 0; }
.prefs-tab { padding: 3px 10px; border-radius: 3px; color: var(--c-text-dim); }
.prefs-tab:hover { color: var(--c-text); background: #ffffff14; }
.prefs-tab.active { color: #fff; background: var(--c-select); }
.prefs-content { min-height: 160px; padding: 4px 0; }
.about-logo { width: 72px; height: 72px; margin: 6px auto 2px; }
.about-logo svg { width: 100%; height: 100%; }
.about-name { text-align: center; font-size: 1.5em; font-weight: 700; }
.about-version { text-align: center; color: var(--c-text-dim); margin-bottom: 8px; }

/* ===== render viewer ===== */
.render-float-wrap { position: fixed; inset: 0; z-index: 5800; background: rgba(0, 0, 0, .6); display: flex; align-items: center; justify-content: center; }
.render-float { background: #252525; border-radius: 6px; overflow: hidden; box-shadow: 0 18px 60px #000a; }
.render-float-head { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 14px; background: #303030; color: var(--c-text); }
.render-float-body { padding: 8px; }
.render-float-body canvas { display: block; max-width: min(960px, 86vw); height: auto; }

/* ===== quit screen ===== */
.bl-quit-screen { position: fixed; inset: 0; z-index: 9000; background: #0a0a0a; display: flex; align-items: center; justify-content: center; animation: quit-fade .5s; }
@keyframes quit-fade { from { opacity: 0; } to { opacity: 1; } }
.bl-quit-msg { color: #888; font-size: 1.1em; }
.boot-error { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; color: #e05656; background: #161616; padding: 30px; text-align: center; }

/* misc */
.tl-canvas { cursor: text; }
