/* UniRender 화면 시안 v0 — 어두운 중성 회색, 강조색 하나, 4px 간격 체계 */
:root {
  --left-w: 288px;
  --right-w: 320px;
  --bg0: #161719;
  --bg1: #1e1f22;
  --bg2: #25272a;
  --bg3: #2d2f33;
  --bg4: #36393d;
  --line: #333539;
  --line2: #3f4246;
  --text: #d5d7da;
  --text2: #b3b7bc;
  --muted: #868b92;
  --accent: #3d9bff;
  --accent-dim: rgba(61, 155, 255, 0.16);
  --accent-line: rgba(61, 155, 255, 0.55);
  --r: 3px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg0); color: var(--text); overflow: hidden; }
body { font: 12px/1.45 'Malgun Gothic', 'Apple SD Gothic Neo', 'Noto Sans KR', system-ui, sans-serif; -webkit-font-smoothing: antialiased; user-select: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { -webkit-user-drag: none; }
.muted { color: var(--muted); }
.small { font-size: 11px; }
.strong { font-weight: 600; color: var(--text); }
.lh { line-height: 1.7; }
.ico { display: inline-flex; flex: none; }
.ico svg { display: block; }

/* ---------- 틀 ---------- */
#shell {
  display: grid; height: 100vh;
  grid-template-columns: var(--left-w) 4px minmax(320px, 1fr) 4px var(--right-w);
  grid-template-rows: auto minmax(0, 1fr) 24px;
  grid-template-areas: "top top top top top" "left sl vp sr right" "status status status status status";
}
#shell.no-left { grid-template-columns: 0 0 minmax(320px, 1fr) 4px var(--right-w); }
#shell.no-right { grid-template-columns: var(--left-w) 4px minmax(320px, 1fr) 0 0; }
#shell.no-left.no-right { grid-template-columns: 0 0 1fr 0 0; }
#shell.no-left #left, #shell.no-left #split-left, #shell.no-right #right, #shell.no-right #split-right { display: none; }
#top { grid-area: top; background: var(--bg0); border-bottom: 1px solid var(--line); }
#left { grid-area: left; }
#right { grid-area: right; }
#split-left { grid-area: sl; }
#split-right { grid-area: sr; }
#viewport { grid-area: vp; position: relative; overflow: hidden; background: #3b3d41; min-width: 0; }
#viewport canvas { display: block; outline: none; }
#status { grid-area: status; display: flex; align-items: center; gap: var(--s4); padding: 0 var(--s3); background: var(--bg0); border-top: 1px solid var(--line); color: var(--text2); font-size: 11px; white-space: nowrap; overflow: hidden; }
#st-sel { flex: none; color: var(--text); max-width: 34%; overflow: hidden; text-overflow: ellipsis; }
#st-hint { flex: 1; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
#st-info { flex: none; color: var(--muted); }
#st-quality { flex: none; display: flex; align-items: center; gap: var(--s2); }
.q-btn { background: var(--bg2); border: 1px solid var(--line2); border-radius: var(--r); color: var(--text2); font-size: 11px; padding: 1px 8px; cursor: default; }
.q-btn:hover { background: var(--bg3); color: var(--text); }
.q-btn.on { border-color: var(--accent-line); color: var(--text); }
.q-prog { color: var(--muted); min-width: 132px; font-variant-numeric: tabular-nums; }

.splitter { background: var(--bg0); cursor: col-resize; position: relative; }
.splitter::after { content: ''; position: absolute; inset: 0 1px; background: transparent; }
.splitter:hover::after, .splitter.active::after { background: var(--accent-line); }

/* ---------- 메뉴 줄 ---------- */
#menubar { display: flex; align-items: center; height: 26px; padding: 0 var(--s2); gap: 2px; }
.brand { font-weight: 700; letter-spacing: .02em; color: var(--text); margin-right: var(--s3); padding-left: 2px; }
.brand::before { content: ''; display: inline-block; width: 8px; height: 8px; background: var(--accent); border-radius: 1px; margin-right: 6px; vertical-align: 0; }
.menu-btn { background: none; border: 0; padding: 3px 8px; border-radius: var(--r); color: var(--text2); cursor: default; }
.menu-btn:hover { background: var(--bg3); color: var(--text); }
.menu-fill { flex: 1; }

/* ---------- 리본 ---------- */
#ribbon { display: flex; align-items: stretch; height: 52px; padding: 0 var(--s2) 4px; gap: 2px; border-top: 1px solid var(--line); background: var(--bg1); }
.rb { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 64px; padding: 4px 8px 2px; background: none; border: 1px solid transparent; border-radius: var(--r); color: var(--text2); cursor: default; margin-top: 4px; }
.rb span:last-child { font-size: 11px; white-space: nowrap; }
.rb:hover:not(:disabled) { background: var(--bg3); color: var(--text); }
.rb.on { color: var(--accent); }
.rb.on:hover { color: var(--accent); }
.rb:disabled { opacity: .38; }
.rb-sep { width: 1px; background: var(--line); margin: 10px 6px 6px; }
.rb-fill { flex: 1; }
.rb-model { align-self: center; color: var(--muted); font-size: 11px; padding-right: var(--s2); }

/* ---------- 패널 ---------- */
.panel { background: var(--bg1); display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; container-type: inline-size; }
@container (max-width: 330px) { .tab .ico { display: none; } }
.panel-title { flex: none; height: 26px; line-height: 26px; padding: 0 var(--s3); font-size: 11px; font-weight: 600; letter-spacing: .04em; color: var(--muted); border-bottom: 1px solid var(--line); background: var(--bg0); }
.tabbar { flex: none; display: flex; gap: 0; padding: 0 var(--s1); border-bottom: 1px solid var(--line); background: var(--bg1); overflow: hidden; }
.tab { flex: 1 1 0; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 4px; height: 30px; padding: 0 2px; background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); cursor: default; white-space: nowrap; }
.tab span:last-child { overflow: hidden; text-overflow: ellipsis; }
.tab:hover { color: var(--text); }
.tab.on { color: var(--text); border-bottom-color: var(--accent); }
.tabbody { flex: 1; min-height: 0; position: relative; }
.tabpage { position: absolute; inset: 0; display: none; flex-direction: column; overflow: hidden; }
.tabpage.on { display: flex; }

.pane-tools { flex: none; display: flex; gap: var(--s1); padding: var(--s2); align-items: center; }
.pane-sub { flex: none; display: flex; justify-content: space-between; align-items: center; padding: 6px var(--s2) 4px; border-top: 1px solid var(--line); font-size: 11px; }
.pane-foot { flex: none; padding: 6px var(--s2); border-top: 1px solid var(--line); font-size: 11px; }
.pane-pad { padding: var(--s2) var(--s3) var(--s4); overflow-y: auto; flex: 1; min-height: 0; }
.search-wrap { flex: 1; display: flex; align-items: center; gap: 6px; height: 26px; padding: 0 8px; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r); color: var(--muted); }
.search-wrap:focus-within { border-color: var(--accent-line); }
.search { flex: 1; min-width: 0; background: none; border: 0; outline: none; height: 24px; color: var(--text); }
.search::placeholder, textarea::placeholder { color: #6c7178; }
.size-wrap { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.size-wrap input { width: 84px; }

.cat-list { flex: none; padding: 0 var(--s1) var(--s1); display: flex; flex-direction: column; }
.cat { display: flex; align-items: center; gap: 8px; height: 24px; padding: 0 8px; border-radius: var(--r); color: var(--text2); cursor: default; }
.cat:hover { background: var(--bg3); }
.cat.on { background: var(--accent-dim); color: var(--text); }
.cat.on .ico { color: var(--accent); }
.cat-name { flex: 1; }
.cat-count { color: var(--muted); font-size: 11px; }

.ball-grid { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--ball, 84px), 1fr)); gap: 6px; padding: var(--s1) var(--s2) var(--s2); align-content: start; }
.ball-grid.small { --ball: 64px; flex: 0 1 auto; max-height: 34%; min-height: 96px; border-top: 1px solid var(--line); padding-top: var(--s2); }
.ball-card { position: relative; display: flex; flex-direction: column; align-items: center; padding: 4px 4px 5px; border: 1px solid transparent; border-radius: var(--r); cursor: grab; }
.ball-card:hover { background: var(--bg3); border-color: var(--line2); }
.ball-card.on { border-color: var(--accent-line); background: var(--accent-dim); }
.ball-card img { width: 100%; aspect-ratio: 1; border-radius: 2px; background: var(--bg2); display: block; opacity: 0; transition: opacity .15s; }
.ball-card img.ready, .ball-card img[src^="data"] { opacity: 1; }
.ball-name { margin-top: 4px; font-size: 11px; line-height: 1.3; text-align: center; color: var(--text2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: keep-all; }
.count-badge { position: absolute; top: 6px; right: 6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--accent); color: #0b1a2c; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; }

.color-wrap { flex: 1; min-height: 0; overflow-y: auto; padding: 0 var(--s2) var(--s2); }
.group-label { font-size: 11px; color: var(--muted); margin: var(--s2) 2px 6px; }
.swatch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 6px; }
.swatch-card { cursor: grab; border-radius: var(--r); padding: 3px; border: 1px solid transparent; }
.swatch-card:hover { background: var(--bg3); border-color: var(--line2); }
.swatch { height: 30px; border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.swatch-name { font-size: 11px; color: var(--text2); text-align: center; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.env-list { flex: 1; min-height: 0; overflow-y: auto; padding: var(--s2); display: flex; flex-direction: column; gap: 4px; }
.env-card { display: flex; gap: var(--s2); align-items: center; padding: 4px; border: 1px solid transparent; border-radius: var(--r); cursor: grab; }
.env-card:hover { background: var(--bg3); border-color: var(--line2); }
.env-card.on { border-color: var(--accent-line); background: var(--accent-dim); }
.env-thumb { width: 52px; height: 52px; border-radius: 2px; background: var(--bg2); flex: none; object-fit: cover; }
.env-thumb:not([src^="data"]) { opacity: .5; }
.env-text { min-width: 0; }
.env-name { color: var(--text); }
.env-note { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.field-label { font-size: 11px; color: var(--muted); margin: var(--s2) 0 4px; }
textarea.prompt { width: 100%; resize: vertical; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r); padding: 6px 8px; outline: none; color: var(--text); }
textarea.prompt:focus { border-color: var(--accent-line); }
.ref-drop { display: flex; align-items: center; gap: 6px; justify-content: center; height: 40px; margin-top: var(--s2); border: 1px dashed var(--line2); border-radius: var(--r); }
.row-gap { display: flex; align-items: center; gap: var(--s2); margin: var(--s2) 0; }
/* AI 배경(js/ai-backplate.js) */
.ai-pane .field-label { margin-top: 10px; }
.ai-pane .btn { margin-top: 4px; }
.ai-pane a.btn { display: inline-flex; text-decoration: none; }
.ai-chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; }
.ai-chips .chip { font-size: 11px; padding: 2px 7px; border: 1px solid var(--line2); border-radius: 10px; background: var(--bg2); color: var(--text2); cursor: pointer; }
.ai-chips .chip.on { border-color: var(--accent-line); background: var(--accent-dim); color: var(--text); }
textarea.ai-prompt { margin-top: 4px; font-size: 11px; line-height: 1.5; color: var(--text2); }
.ai-drop { cursor: pointer; padding: 0 8px; text-align: center; }
.ai-drop.on { border-color: var(--accent); background: var(--accent-dim); }
.ai-place { margin-top: 6px; }
.ai-bp-row { display: flex; gap: 8px; align-items: center; margin: 6px 0; }
.ai-bp-thumb { width: 84px; height: 56px; object-fit: cover; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg2); }
.ai-slots { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ai-slot { aspect-ratio: 3 / 2; display: flex; align-items: center; justify-content: center; background: repeating-linear-gradient(45deg, var(--bg2) 0 6px, #232528 6px 12px); border: 1px solid var(--line); border-radius: var(--r); color: var(--muted); font-size: 11px; }

.empty { padding: var(--s4); text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: var(--s2); }
.empty.tall { padding-top: 48px; }
.badge { display: inline-block; padding: 1px 6px; border: 1px solid var(--line2); border-radius: 2px; font-size: 10px; color: var(--muted); }

/* ---------- 장면 트리 ---------- */
.tree { flex: 1 1 auto; min-height: 120px; overflow-y: auto; padding: 0 var(--s1) var(--s1); }
.tree-row { display: flex; align-items: center; gap: 4px; height: 24px; padding-right: 4px; border-radius: var(--r); color: var(--text2); cursor: default; }
.tree-row:hover { background: var(--bg3); }
.tree-row.sel { background: var(--accent-dim); color: var(--text); box-shadow: inset 2px 0 0 var(--accent); }
.tree-row.drop-hover { background: var(--accent-dim); box-shadow: inset 0 0 0 1px var(--accent); }
.tree-row.hidden-part .node-name, .tree-row.hidden-part .node-mat { opacity: .45; }
.chev, .eye { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; padding: 0; background: none; border: 0; border-radius: 2px; color: var(--muted); cursor: default; }
.chev:hover, .eye:hover { background: var(--bg4); color: var(--text); }
.chev-sp { width: 18px; flex: none; }
.eye.off { color: #5d6268; }
.eye.partial { color: var(--text2); opacity: .7; }
.node-ico { color: var(--muted); }
.tree-row.sel .node-ico { color: var(--accent); }
.node-name { flex: 1 1 auto; min-width: 40px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.node-mat { flex: 0 1 auto; min-width: 0; max-width: 55%; display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); }
.node-mat span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.node-mat img { width: 14px; height: 14px; border-radius: 50%; flex: none; background: var(--bg4); }
.node-count { font-size: 11px; }
.link-ico { color: var(--accent); }

.section-label { flex: none; display: flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--muted); padding: var(--s3) 0 6px; letter-spacing: .02em; }
.tabpage > .section-label { padding: var(--s2) var(--s3) 4px; border-top: 1px solid var(--line); }
.info-box { flex: none; padding: 0 var(--s3) var(--s3); }
.kv { display: flex; justify-content: space-between; gap: var(--s2); padding: 3px 0; border-bottom: 1px solid #2a2c30; }
.kv > span:first-child { color: var(--muted); flex: none; }
.kv > span:last-child { text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mat-chip { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.mat-chip:hover { color: var(--accent); }
.mat-chip img { width: 16px; height: 16px; border-radius: 50%; background: var(--bg4); }
.btn-row { display: flex; gap: 6px; margin-top: var(--s2); flex-wrap: wrap; }

/* ---------- 버튼·입력 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 26px; padding: 0 10px; background: var(--bg3); border: 1px solid var(--line2); border-radius: var(--r); color: var(--text); cursor: default; white-space: nowrap; }
.btn:hover:not(:disabled) { background: var(--bg4); }
.btn:disabled { opacity: .4; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #07182b; font-weight: 600; }
.btn.small { height: 22px; padding: 0 8px; font-size: 11px; }
.btn.wide { width: 100%; margin-top: var(--s2); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; padding: 0; background: none; border: 1px solid transparent; border-radius: var(--r); color: var(--muted); }
.icon-btn:hover { background: var(--bg3); color: var(--text); }
select { height: 26px; width: 100%; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r); padding: 0 6px; outline: none; }
select:focus { border-color: var(--accent-line); }
input[type=text] { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r); outline: none; height: 24px; padding: 0 6px; }
input[type=text]:focus { border-color: var(--accent-line); }
input[type=checkbox] { accent-color: var(--accent); margin: 0; }

input[type=range] { -webkit-appearance: none; appearance: none; height: 18px; background: none; margin: 0; min-width: 0; }
input[type=range]::-webkit-slider-runnable-track { height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--accent) 0 var(--fill, 50%), var(--bg4) var(--fill, 50%) 100%); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 11px; height: 11px; margin-top: -4px; border-radius: 50%; background: #e3e5e8; border: 0; }
input[type=range]:hover::-webkit-slider-thumb { background: #fff; }

.prop-row { display: grid; grid-template-columns: 84px minmax(0, 1fr) 46px; align-items: center; gap: var(--s2); min-height: 28px; }
.prop-row > label { color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prop-row .num { width: 46px; text-align: right; padding: 0 4px; font-variant-numeric: tabular-nums; }
.prop-row .num.wide { width: 100%; text-align: left; grid-column: span 2; }
.prop-row > select { grid-column: span 2; }
.prop-row.color { grid-template-columns: 84px 1fr 72px; }
.prop-row.color .hex { width: 72px; text-transform: uppercase; font-variant-numeric: tabular-nums; }
.swatch-wrap { display: block; height: 22px; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line2); }
.swatch-wrap input[type=color] { -webkit-appearance: none; appearance: none; width: calc(100% + 8px); height: 30px; margin: -4px; padding: 0; border: 0; background: none; cursor: pointer; }
.check-row { display: flex; align-items: center; gap: var(--s2); min-height: 28px; color: var(--text2); }
.view-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.soon-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: var(--s3); }
.soon { padding: 2px 8px; border: 1px dashed var(--line2); border-radius: 2px; color: #70757c; font-size: 11px; }

/* ---------- 재질 탭 ---------- */
.mat-editor { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: var(--s2) var(--s3) var(--s3); }
.mat-head { display: flex; gap: var(--s2); }
.mat-name { flex: 1; height: 28px !important; font-size: 13px; font-weight: 600; background: transparent !important; border-color: transparent !important; padding: 0 4px !important; }
.mat-name:hover { border-color: var(--line) !important; }
.mat-name:focus { border-color: var(--accent-line) !important; background: var(--bg2) !important; }
.mat-meta { display: flex; align-items: center; gap: var(--s2); padding: 2px 4px 0; font-size: 11px; }
.mat-meta .users { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.link-badge { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); white-space: nowrap; }
.mat-top { display: grid; grid-template-columns: 112px 1fr; gap: var(--s3); margin-top: var(--s3); }
.mat-preview { width: 112px; height: 112px; border-radius: var(--r); border: 1px solid var(--line2); overflow: hidden; cursor: grab; background: var(--bg2); }
.mat-preview.drop-hover { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.mat-preview img { width: 100%; height: 100%; display: block; }
.mat-side .field-label { margin-top: 0; }
.disabled-tools { display: flex; flex-wrap: wrap; gap: 4px; margin-top: var(--s2); }
.props { display: flex; flex-direction: column; }

/* ---------- 오른쪽 메뉴·알림·대화상자 ---------- */
.ctx-menu { position: fixed; z-index: 50; min-width: 220px; padding: 4px; background: #232528; border: 1px solid var(--line2); border-radius: 4px; box-shadow: 0 6px 18px rgba(0,0,0,.45); }
.ctx-item { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); height: 26px; padding: 0 10px; border-radius: 2px; color: var(--text); cursor: default; white-space: nowrap; }
.ctx-item:hover:not(.disabled) { background: var(--accent); color: #07182b; }
.ctx-item:hover:not(.disabled) .ctx-hint { color: #0b2a4d; }
.ctx-item.disabled { color: #62676d; }
.ctx-hint { color: var(--muted); font-size: 11px; }
.ctx-sep { height: 1px; background: var(--line); margin: 4px 2px; }
#toast { position: fixed; left: 50%; bottom: 40px; transform: translate(-50%, 8px); padding: 6px 14px; background: #2b2e32; border: 1px solid var(--line2); border-radius: 4px; color: var(--text); opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; z-index: 60; white-space: nowrap; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
.modal-back { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 70; display: flex; align-items: center; justify-content: center; }
.modal { max-width: calc(100vw - 32px); background: var(--bg1); border: 1px solid var(--line2); border-radius: 4px; box-shadow: 0 12px 32px rgba(0,0,0,.5); }
.modal-head { display: flex; align-items: center; justify-content: space-between; height: 34px; padding: 0 4px 0 var(--s3); border-bottom: 1px solid var(--line); font-weight: 600; }
.modal-body { padding: var(--s3); max-height: 70vh; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: var(--s2); padding: var(--s2) var(--s3); border-top: 1px solid var(--line); }
.import-list { display: flex; flex-direction: column; gap: 4px; }
.import-item { display: flex; align-items: center; gap: var(--s3); padding: var(--s2) var(--s3); border: 1px solid var(--line); border-radius: var(--r); cursor: default; }
.import-item:hover:not(.disabled) { background: var(--bg3); border-color: var(--line2); }
.import-item.on { border-color: var(--accent-line); }
.import-item.disabled { opacity: .45; }
.import-item .ico { color: var(--muted); }
/* 조명 핀 */
.pin-tools { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.pin-map { width: 100%; aspect-ratio: 2 / 1; display: block; border: 1px solid var(--line2); border-radius: 3px; cursor: grab; image-rendering: auto; background: #000; }
.pin-list { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.pin-row { display: flex; align-items: center; gap: 6px; padding: 3px 4px; border-radius: 3px; cursor: default; }
.pin-row:hover { background: var(--bg3); }
.pin-row.on { background: var(--accent-dim); outline: 1px solid var(--accent-line); }
.pin-row .pin-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pin-row .pin-shape { width: 58px; }
.pin-edit { margin-top: 6px; }
.pin-kelvin { display: flex; gap: 4px; flex-wrap: wrap; }
/* 렌더 결과 겹치기와 진행 표시 */
#render-view { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: none; pointer-events: none; z-index: 5; }
#render-view.show { display: block; }
#render-hud { position: absolute; left: 12px; top: 12px; z-index: 6; min-width: 320px; max-width: calc(100% - 24px); background: rgba(22,23,25,.88); border: 1px solid var(--line2); border-radius: 4px; padding: 6px 8px; color: var(--text); font-size: 12px; box-shadow: 0 4px 14px rgba(0,0,0,.35); }
#render-hud.hidden { display: none; }
#render-hud .hud-row { display: flex; align-items: center; gap: 8px; }
#render-hud .hud-title { font-weight: 600; white-space: nowrap; }
#render-hud .hud-phase { color: var(--text2); flex: 1; white-space: nowrap; font-variant-numeric: tabular-nums; }
#render-hud .hud-bar { height: 3px; background: var(--bg3); margin-top: 5px; border-radius: 2px; overflow: hidden; }
#render-hud .hud-bar > div { height: 100%; background: var(--accent); transition: width .3s; }
#render-hud .hud-error { color: #ff9b8f; margin-top: 4px; }
#render-hud .hud-error span { flex: 1; white-space: normal; }
.render-list { display: flex; flex-direction: column; gap: 8px; }
.render-card { display: flex; gap: 8px; padding: 6px; border: 1px solid var(--line); border-radius: var(--r); }
.render-card.on { border-color: var(--accent-line); }
.render-card img { width: 96px; height: 72px; object-fit: contain; background: var(--bg0); border-radius: 2px; cursor: pointer; flex: none; }
.render-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.render-actions { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 2px; }
.import-drop { border-style: dashed; }
.import-drop.on { border-color: var(--accent); background: var(--accent-dim); }
.import-path-row { display: flex; flex-direction: column; gap: 4px; padding: var(--s2) 2px 0; }
.import-path-row .row { display: flex; gap: var(--s2); }
.path-input { flex: 1; min-width: 0; background: var(--bg2); border: 1px solid var(--line2); border-radius: var(--r); color: var(--text); padding: 4px 8px; font-size: 12px; }
.rec-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.rec-table td { padding: 3px 6px; border-bottom: 1px solid var(--line); }
pre.log { max-height: 220px; overflow: auto; background: var(--bg0); padding: var(--s2); font-size: 11px; white-space: pre-wrap; }
.help p { margin: 0 0 var(--s2); color: var(--text2); }
.help-table { border-collapse: collapse; width: 100%; }
.help-table th, .help-table td { text-align: left; padding: 5px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.help-table th { color: var(--text); font-weight: 600; white-space: nowrap; width: 38%; }
.help-table td { color: var(--text2); }

/* ---------- 끌기 ---------- */
.drag-ghost { position: fixed; left: 0; top: 0; z-index: 80; pointer-events: none; display: flex; align-items: center; gap: 6px; padding: 3px 8px 3px 3px; background: #26292d; border: 1px solid var(--accent-line); border-radius: 4px; color: var(--text); box-shadow: 0 4px 12px rgba(0,0,0,.4); white-space: nowrap; }
.drag-ghost img, .ghost-swatch { width: 28px; height: 28px; border-radius: 50%; display: block; }
.drag-ghost.no { border-color: var(--line2); opacity: .8; }
body.dragging, body.dragging * { cursor: grabbing !important; }

#loading { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(30,31,34,.6); color: var(--text2); z-index: 5; pointer-events: none; }
#loading.show { display: flex; }

/* 웹 모드: 렌더 도우미가 꺼져 있을 때 안내(js/main.js showHelperOff) */
#helper-off { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 7; width: min(520px, calc(100% - 32px)); background: rgba(22,23,25,.95); border: 1px solid var(--line2); border-radius: 6px; padding: 16px 18px; color: var(--text); font-size: 13px; box-shadow: 0 8px 24px rgba(0,0,0,.45); display: none; }
#helper-off.show { display: block; }
/* 웹 모드: 도우미가 오래된 판일 때 위쪽 띠(js/main.js) */
#helper-old { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); z-index: 7; max-width: calc(100% - 32px); display: flex; gap: 10px; align-items: center; background: rgba(120, 72, 20, .92); border: 1px solid #d9a24a; border-radius: 4px; padding: 6px 10px; color: #fff3df; font-size: 12px; }
#helper-off h3 { margin: 0 0 8px; font-size: 15px; }
#helper-off p { margin: 6px 0; line-height: 1.5; }
#helper-off pre { background: var(--bg3); padding: 8px; border-radius: 3px; white-space: pre-wrap; word-break: break-all; user-select: all; margin: 6px 0; }
#helper-off .row { display: flex; gap: 8px; margin-top: 10px; align-items: center; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #3a3d41; border-radius: 5px; border: 2px solid var(--bg1); }
::-webkit-scrollbar-thumb:hover { background: #4a4d52; }
::-webkit-scrollbar-track { background: transparent; }

/* 렌더 주의(warnings)·환경 대체 안내, 장면 캡처 */
.hud-warn { color: #e0b45a; margin-top: 4px; }
.render-warnings { margin: 2px 0; }
.scene-capture { display: block; max-width: 100%; max-height: 260px; margin: 8px 0 4px; border-radius: 4px; border: 1px solid var(--line, #33363a); }
.scene-thumb { width: 64px; height: 44px; object-fit: cover; border-radius: 3px; flex: none; background: #222; }
