/* ZAXIS panel styles. Pixel values follow design/*.dc.html (360 px design width; fluid 320–480). */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--panel-bg); }
body { color: var(--text); font-family: var(--font-ui); font-size: 12px; -webkit-font-smoothing: antialiased; overflow: hidden; }
button { font: inherit; cursor: pointer; color: inherit; }
button:disabled { cursor: not-allowed; opacity: 0.5; }
a { color: var(--text-muted); text-decoration: none; }
a:hover { color: var(--text); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input[type=range] { width: 100%; accent-color: var(--accent); margin: 0; height: 18px; cursor: pointer; }
input[type=checkbox] { accent-color: var(--accent); width: 14px; height: 14px; margin: 0; flex: none; cursor: pointer; }
select { width: 100%; height: 32px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--r-button); padding: 0 8px; font: inherit; font-size: 12px; }
input[type=text], input[type=search], input[type=password] { width: 100%; height: 32px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--r-button); padding: 0 10px; font: inherit; font-size: 12px; }
input::placeholder { color: var(--text-label); }

.panel { position: relative; height: calc(100vh / var(--ui-zoom, 1)); min-width: 320px; display: flex; flex-direction: column; overflow: hidden; background: var(--panel-bg); }

/* Header */
.hdr { display: flex; align-items: center; justify-content: space-between; padding: 12px var(--pad); border-bottom: 1px solid var(--border-subtle); flex: none; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.logo { width: 28px; height: 28px; border-radius: var(--r-logo); background: var(--accent); display: flex; align-items: center; justify-content: center; color: var(--on-accent); font-family: var(--font-display); font-weight: 700; font-size: 16px; flex: none; }
.brand-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.wordmark { font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: 0.08em; }
.tagline { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hdr-actions { display: flex; gap: 4px; flex: none; }
.icon-btn { width: var(--icon-btn); height: var(--icon-btn); border-radius: var(--r-button); border: 1px solid var(--border); background: var(--surface); color: var(--text); display: flex; align-items: center; justify-content: center; padding: 0; }
.icon-btn:hover { background: var(--surface-raised); }

/* Context strip */
.ctx { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px var(--pad); background: var(--context-strip); font-size: 11px; color: var(--text-muted); flex: none; min-height: 33px; }
.ctx strong { color: var(--text); font-weight: 600; }
.ctx > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.badge { padding: 3px 8px; border-radius: var(--r-chip); border: 1px solid var(--border); color: var(--text); white-space: nowrap; flex: none; }
.ctx.empty { color: var(--warning); }
button.badge { background: none; font: inherit; font-size: 11px; cursor: pointer; }
button.badge::after { content: ""; display: inline-block; margin-left: 5px; border: 3px solid transparent; border-top: 4px solid var(--text-muted); border-bottom: 0; vertical-align: 2px; }
button.badge:hover { background: var(--surface); border-color: var(--accent); }

/* Tabs */
.tabs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-bottom: 1px solid var(--border-subtle); flex: none; }
.tab { height: var(--tab-h); display: flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 500; color: var(--text-muted); border: none; border-bottom: 2px solid transparent; background: none; padding: 0 2px; white-space: nowrap; overflow: hidden; }
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { font-weight: 600; color: var(--text); border-bottom-color: var(--accent); }
.tab .lock { width: 9px; height: 9px; margin-left: 3px; opacity: 0.6; }

/* Main (the only scrolling region) */
main { flex: 1; display: flex; flex-direction: column; gap: var(--section-gap); padding: var(--pad); overflow-y: auto; overflow-x: hidden; min-height: 0; outline: none; }
main::-webkit-scrollbar { width: 8px; }
main::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; border: 2px solid var(--panel-bg); }
section { display: flex; flex-direction: column; gap: 8px; flex: none; }
.sec-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sec-head.baseline { align-items: baseline; }
h2 { margin: 0; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-label); }
.link { background: none; border: none; color: var(--accent); font-size: 11px; font-weight: 600; padding: 4px 0; white-space: nowrap; }
.link:hover { text-decoration: underline; }
.muted { color: var(--text-muted); }
.small { font-size: 11px; }
.hint { font-size: 11px; color: var(--text-muted); line-height: 1.4; }
.hint.warn { color: var(--warning); }

/* Chips, tiles, segmented */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { height: var(--chip-h); padding: 0 10px; border-radius: var(--r-chip); font-size: 11px; background: var(--surface); border: 1px solid var(--border); color: var(--text-muted); }
.chip:hover { color: var(--text); }
.chip[aria-pressed="true"] { background: var(--accent-tint); border-color: var(--accent); color: var(--text); }
.name-chip { padding: 4px 8px; border-radius: var(--r-small); background: var(--surface); border: 1px solid var(--border); font-size: 11px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.name-chip.rig { border-color: var(--accent); background: var(--accent-tint); }
.grid4 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
@media (max-width: 339px) { .grid4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile { height: var(--tile-h); border-radius: var(--r-tile); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 0 3px; background: var(--surface); border: 1px solid var(--border); color: var(--text-muted); position: relative; }
.tile svg { width: 15px; height: 15px; flex: none; }
.tile:hover { color: var(--text); border-color: var(--border-dashed); }
.tile[aria-pressed="true"] { background: var(--accent-tint); border-color: var(--accent); color: var(--text); }
.tile span { font-size: 9.5px; line-height: 1.1; text-align: center; }
.tile .user-dot { position: absolute; top: 4px; right: 4px; width: 4px; height: 4px; border-radius: 50%; background: var(--keyframe); }
.seg { display: grid; border: 1px solid var(--border); border-radius: var(--r-seg); overflow: hidden; }
.seg button { height: 30px; border: none; padding: 0; font-size: 11px; background: var(--surface); color: var(--text); }
.seg button + button { border-left: 1px solid var(--border); }
.seg button.has-ic { display: flex; align-items: center; justify-content: center; gap: 5px; padding: 0 4px; min-width: 0; }
.seg button.has-ic span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seg button.has-ic svg { flex: none; }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.mini-btns { display: flex; flex-wrap: wrap; gap: 5px; }
.mini { height: 26px; padding: 0 8px; border-radius: var(--r-small); border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 11px; }
.mini[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-tint); }

/* Controls */
.controls { display: flex; flex-direction: column; gap: var(--row-gap); }
.slider { display: flex; flex-direction: column; gap: 6px; }
.slider label, .slider .lbl { display: flex; justify-content: space-between; gap: 8px; }
.slider .lbl > span:first-child, .field > span:first-child { color: var(--text-muted); }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.inline-link { background: none; border: none; padding: 0; color: var(--text-muted); font-size: inherit; text-decoration: underline dotted; text-underline-offset: 2px; }
.inline-link:hover { color: var(--text); }
.checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; min-width: 0; }
.check.wide { grid-column: 1 / -1; }
.check.disabled { opacity: 0.45; cursor: not-allowed; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.btn { height: var(--btn-h); border-radius: var(--r-button); border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 11px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn:hover:not(:disabled) { background: var(--surface-raised); }
.btn.on { border-color: var(--accent); background: var(--accent-tint); }
.row { display: flex; gap: 8px; }
.row > .grow { flex: 1; min-width: 0; }

/* Preview boxes */
.preview { position: relative; flex: none; border-radius: var(--r-preview); background: var(--canvas-bg); border: 1px solid var(--border-subtle); overflow: hidden; }
.preview .cap { position: absolute; top: 8px; left: 10px; font-size: 10px; color: var(--text-muted); letter-spacing: 0.06em; text-transform: uppercase; pointer-events: none; }
.preview .desc { position: absolute; bottom: 8px; left: 10px; right: 10px; font-size: 11px; color: var(--text); pointer-events: none; }
.preview .hint-r { position: absolute; bottom: 8px; right: 10px; font-size: 10px; color: var(--text-muted); pointer-events: none; }
.p3d { height: 210px; perspective: 800px; cursor: grab; touch-action: none; user-select: none; }
.p3d.dragging { cursor: grabbing; }
.p3d .floor { position: absolute; left: 0; right: 0; bottom: 0; height: 70px; background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px); background-size: 22px 22px; transform: perspective(300px) rotateX(55deg); transform-origin: bottom; opacity: 0.8; pointer-events: none; }
.p3d .stage { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform-style: preserve-3d; }
.card3d { position: absolute; left: 0; top: 0; border-radius: 7px; padding: 7px; display: flex; flex-direction: column; gap: 4px; transition: transform 0.6s var(--ease-preview), width 0.6s, height 0.6s, margin 0.6s, opacity 0.4s; }
.card3d i { display: block; border-radius: 3px; }
.card3d i:first-child { width: 55%; height: 4px; background: rgba(255,255,255,0.6); }
.card3d i:last-child { width: 80%; height: 3px; background: rgba(255,255,255,0.25); }
.gizmo { position: absolute; left: 10px; bottom: 8px; }
.ppath { height: 120px; }
.ppath svg { position: absolute; left: 0; top: 0; width: 100%; height: 118px; }
.pmotion { height: 150px; perspective: 278px; perspective-origin: 50% 50%; }
.mframe { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); border: 1px dashed var(--border); border-radius: 2px; pointer-events: none; }
.mstage { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform-style: preserve-3d; }
.mcard { position: absolute; left: 0; top: 0; border-radius: 4px; border: 1px solid rgba(255,255,255,0.18); padding: 5px; display: flex; flex-direction: column; gap: 3px; backface-visibility: visible; }
.mcard i { display: block; border-radius: 2px; }
.mcard i:first-child { width: 55%; height: 3px; background: rgba(255,255,255,0.6); }
.mcard i:last-child { width: 80%; height: 2px; background: rgba(255,255,255,0.25); }
.ease-row { display: flex; flex-direction: row; gap: 12px; align-items: center; }
.ease-svg { flex: none; background: var(--canvas-bg); border: 1px solid var(--border-subtle); border-radius: 8px; }

/* Camera bits */
.shot-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; gap: 2px; }
.shot { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px; border-radius: var(--r-seg); background: var(--surface); border: 1px solid var(--border); }
.shot .n { width: 18px; height: 18px; border-radius: 4px; background: var(--context-strip); display: flex; align-items: center; justify-content: center; font-size: 10px; color: var(--text-muted); flex: none; }
.shot .rig { flex: 1; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shot .tr { padding: 2px 6px; border-radius: 4px; border: 1px solid var(--border); font-size: 10px; color: var(--text-muted); background: none; }
.shot .x { background: none; border: none; color: var(--text-label); padding: 0 2px; font-size: 14px; line-height: 1; visibility: hidden; }
.shot:hover .x, .shot:focus-within .x { visibility: visible; }
.pill { height: 28px; padding: 0 10px; border-radius: var(--r-chip); border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 11px; display: inline-flex; align-items: center; gap: 6px; }
.pill.add { border-style: dashed; border-color: var(--border-dashed); background: none; color: var(--text-muted); }
.pill .x { color: var(--text-label); font-size: 13px; line-height: 1; display: none; }
.pill:hover .x { display: inline; }

/* Output bar + footer */
.output { display: flex; flex-direction: column; gap: 6px; padding: 10px var(--pad); border-top: 1px solid var(--border-subtle); background: var(--footer-bg); flex: none; }
.output[hidden], .ftr[hidden] { display: none; }
.output .head { display: flex; align-items: center; justify-content: space-between; }
.output .head > span { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-label); }
.output .note { font-size: 11px; color: var(--text-muted); line-height: 1.35; }
.ftr { display: flex; flex-direction: column; gap: 8px; padding: 12px var(--pad); border-top: 1px solid var(--border-subtle); background: var(--footer-bg); flex: none; }
.ftr .btns { display: flex; gap: 8px; }
.ftr button { flex: 1; height: var(--primary-h); border-radius: var(--r-tile); font-weight: 600; min-width: 0; padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ftr .sec { border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.ftr .sec:hover:not(:disabled) { background: var(--surface-raised); }
.ftr .pri { border: none; background: var(--accent); color: var(--on-accent); font-weight: 700; }
.ftr .pri:hover:not(:disabled) { filter: brightness(1.08); }
.progress { height: 3px; border-radius: 2px; background: var(--surface); overflow: hidden; position: relative; }
.progress::after { content: ""; position: absolute; top: 0; bottom: 0; width: 35%; background: var(--accent); animation: zx-progress 1.1s ease-in-out infinite; }
@keyframes zx-progress { 0% { left: -35%; } 100% { left: 100%; } }

/* Toasts */
.toasts { position: absolute; left: var(--pad); right: var(--pad); bottom: 150px; display: flex; flex-direction: column; gap: 6px; pointer-events: none; z-index: 30; }
.toast { pointer-events: auto; display: flex; gap: 8px; align-items: flex-start; padding: 9px 10px; border-radius: 8px; background: var(--surface-raised); border: 1px solid var(--border); box-shadow: 0 8px 24px rgba(0,0,0,0.4); font-size: 11.5px; line-height: 1.35; animation: zx-in 0.18s ease-out; }
.toast.err { border-color: rgba(255,107,107,0.55); }
.toast.warn { border-color: rgba(255,181,71,0.5); }
.toast.ok { border-color: rgba(91,214,138,0.45); }
.toast .dot { width: 7px; height: 7px; border-radius: 50%; margin-top: 4px; flex: none; background: var(--accent); }
.toast.err .dot { background: var(--danger); } .toast.warn .dot { background: var(--warning); } .toast.ok .dot { background: var(--success); }
.toast .msg { flex: 1; min-width: 0; }
.toast .close { background: none; border: none; color: var(--text-label); padding: 0; font-size: 14px; line-height: 1; }
@keyframes zx-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Overlays: modal, popover, search, license */
.scrim { position: absolute; inset: 0; background: rgba(10,11,13,0.6); z-index: 40; display: flex; align-items: flex-start; justify-content: center; padding: 56px 12px 12px; }
.dialog { width: 100%; max-width: 420px; background: var(--panel-bg); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 20px 50px rgba(0,0,0,0.5); padding: 14px; display: flex; flex-direction: column; gap: 12px; max-height: 100%; overflow: auto; }
.dialog h3 { margin: 0; font-size: 13px; font-weight: 600; }
.dialog p { margin: 0; color: var(--text-muted); line-height: 1.45; }
.dialog .actions { display: flex; gap: 8px; justify-content: flex-end; }
.dialog .actions button { height: 32px; padding: 0 14px; border-radius: var(--r-button); font-weight: 600; }
.dialog .actions .sec { border: 1px solid var(--border); background: var(--surface); }
.dialog .actions .pri { border: none; background: var(--accent); color: var(--on-accent); font-weight: 700; }
.dialog .actions .danger { border: none; background: var(--danger); color: #2A0E0E; font-weight: 700; }
.dlg-sec { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border-subtle); }
.dlg-sec:first-of-type { border-top: none; padding-top: 0; }
.swatches { display: flex; gap: 8px; }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; padding: 0; }
.swatch[aria-pressed="true"] { border-color: var(--text); }
.kv { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; }
.kv > span:first-child { color: var(--text-muted); }
.path { font-size: 11px; color: var(--text-muted); word-break: break-all; }

.search-res { display: flex; flex-direction: column; gap: 2px; max-height: 340px; overflow: auto; margin: 0 -4px; }
.sr-group { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-label); padding: 8px 6px 4px; }
.sr { display: flex; align-items: center; gap: 10px; padding: 7px 6px; border-radius: 6px; background: none; border: none; text-align: left; width: 100%; color: var(--text); }
.sr svg { flex: none; color: var(--text-muted); }
.sr .t { flex: 1; min-width: 0; }
.sr .t small { display: block; color: var(--text-muted); font-size: 10.5px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr .tag { font-size: 10px; color: var(--text-label); border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; flex: none; }
.sr[aria-selected="true"], .sr:hover { background: var(--surface); }
.sr:disabled { opacity: 0.45; }

.popover { position: absolute; z-index: 35; background: var(--panel-bg); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 12px 30px rgba(0,0,0,0.45); padding: 6px; min-width: 200px; max-width: calc(100% - 28px); display: flex; flex-direction: column; gap: 2px; }
.popover .item { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 5px; background: none; border: none; text-align: left; color: var(--text); font-size: 11.5px; }
.popover .item:hover { background: var(--surface); }
.popover .sep { height: 1px; background: var(--border-subtle); margin: 4px 0; }
.popover .empty { padding: 8px; color: var(--text-muted); font-size: 11px; }

.license { position: absolute; inset: 0; z-index: 50; background: var(--panel-bg); display: flex; flex-direction: column; align-items: stretch; justify-content: center; padding: 24px 22px; gap: 16px; }
.license .logo { width: 44px; height: 44px; font-size: 24px; border-radius: 10px; }
.license h1 { margin: 0; font-family: var(--font-display); font-size: 20px; letter-spacing: 0.06em; }
.license p { margin: 0; color: var(--text-muted); line-height: 1.5; }
.license .err { color: var(--danger); font-size: 11.5px; min-height: 16px; }
.license .pri { height: 40px; border-radius: 8px; border: none; background: var(--accent); color: var(--on-accent); font-weight: 700; }

/* Phase / locked cards */
.phase-card { border: 1px dashed var(--border-dashed); border-radius: var(--r-preview); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.phase-card h3 { margin: 0; font-size: 14px; font-family: var(--font-display); }
.phase-card ul { margin: 0; padding-left: 18px; color: var(--text-muted); line-height: 1.6; }
.tag-phase { align-self: flex-start; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-accent); background: var(--accent); border-radius: 4px; padding: 2px 6px; font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
  .card3d { transition: none; }
}
.grow { flex: 1; min-width: 0; }

/* Look tab */
.preview.lprev { height: 130px; display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 22px; }
.lprev .sphere { width: 86px; height: 86px; border-radius: 50%; transition: background 0.4s; flex: none; }
.lprev-txt { display: flex; flex-direction: column; gap: 4px; }
.lprev-txt strong { font-family: var(--font-display, "Space Grotesk", sans-serif); font-size: 17px; font-weight: 600; }
.cap-s { font-size: 10px; color: var(--text-muted); letter-spacing: 0.06em; text-transform: uppercase; }
.looks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.look { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 5px; padding: 5px; min-width: 0; border-radius: var(--r-tile); background: var(--surface); border: 1px solid var(--border); color: var(--text); text-align: left; }
.look:hover:not(:disabled) { border-color: var(--border-dashed); }
.look[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-tint); }
.look .sw { width: 100%; height: 22px; border-radius: 4px; flex: none; border: 1px solid rgba(255,255,255,0.12); }
.look .lt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.look .lt strong { font-weight: 600; font-size: 10.5px; line-height: 1.2; overflow-wrap: anywhere; }
.look .lt span { font-size: 9.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.look .user-dot { position: absolute; top: 4px; right: 4px; width: 4px; height: 4px; border-radius: 50%; background: var(--keyframe); }
.mats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.mat { height: 42px; border-radius: var(--r-tile); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 0; background: var(--surface); border: 1px solid var(--border); }
.mat .dot { width: 20px; height: 20px; border-radius: 50%; }
.mat span:last-child { font-size: 9px; color: var(--text-muted); }
.mat[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-tint); }
.chip.add { border-style: dashed; background: none; color: var(--text-muted); }
.drop { height: 52px; border-radius: var(--r-tile); border: 1px dashed var(--border-dashed); background: var(--surface-sunken, #191A1D); color: var(--text); display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 12px; width: 100%; }
.drop:hover:not(:disabled) { border-color: var(--accent); }
.sub { display: flex; flex-direction: column; gap: 8px; }
section.off > *:not(.sec-head):not(.hint), .sub.off > *:not(.hint) { opacity: 0.45; }
.kit-l { font-size: 11px; align-self: center; }
@media (max-width: 340px) { .mats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Proximity */
.preview.pprox { height: 176px; perspective: 600px; }
.pf-dot { position: absolute; width: 20px; height: 20px; border-radius: 5px; background: #4A5786; box-shadow: inset 0 1px 0 rgba(255,255,255,0.14); will-change: transform, opacity; }
.pf-ring { position: absolute; border: 1.5px dashed var(--warning); border-radius: 50%; opacity: 0.9; pointer-events: none; background: radial-gradient(closest-side, rgba(255,181,71,0.13), rgba(255,181,71,0.04) 75%, transparent); z-index: 0; }
.pf-dot { z-index: 1; }
.pf-ring.in { border-style: solid; border-color: rgba(255,181,71,0.6); background: none; z-index: 2; }
.shapes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.chip.sq { height: 30px; border-radius: 6px; padding: 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.driven { display: flex; flex-direction: column; gap: 6px; }
.drow { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px 0 10px; border-radius: 6px; background: var(--surface); border: 1px solid var(--border); }
.drow .dname { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; cursor: pointer; }
.drow .dname span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drow:not(.on) .dname span { color: var(--text-muted); }
.drow .damt { width: 58px; height: 22px; padding: 0 6px; border-radius: 4px; border: 1px solid var(--border); background: var(--panel-bg); color: var(--text); font: inherit; font-variant-numeric: tabular-nums; text-align: right; }
.drow .damt:disabled, .drow .dcol:disabled { opacity: 0.45; }
.drow .dunit { width: auto; min-width: 18px; max-width: 78px; flex: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-muted); font-size: 11px; }
.drow .dcol { width: 22px; height: 22px; padding: 0; border: 1px solid var(--border); border-radius: 4px; background: none; cursor: pointer; }
.stack { display: flex; flex-direction: column; gap: 4px; }
.srow { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 4px 0 2px; border-radius: 6px; background: var(--surface); border: 1px solid var(--border); }
.srow.off .sname { color: var(--text-muted); text-decoration: line-through; }
.srow .eye { width: 26px; height: 26px; flex: none; display: flex; align-items: center; justify-content: center; border: none; background: none; color: var(--text-muted); border-radius: 4px; padding: 0; }
.srow .eye[aria-pressed="true"] { color: var(--warning); }
.srow .eye:hover { background: var(--panel-bg); color: var(--text); }
.srow .sname { flex: 1; min-width: 0; text-align: left; border: none; background: none; color: var(--text); font: inherit; padding: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srow .muted { font-size: 11px; white-space: nowrap; }
@media (max-width: 339px) { .shapes { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.popover .item.danger { color: var(--danger); }

/* Scene */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.stat { display: flex; flex-direction: column; gap: 1px; padding: 5px 7px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); }
.stat .num { font-family: var(--font-display, "Space Grotesk", sans-serif); font-size: 15px; font-weight: 700; line-height: 1.1; }
.stat span:last-child { font-size: 9.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat.warn .num { color: var(--warning); }
.issue { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; border: 1px solid rgba(255,181,71,0.35); background: rgba(255,181,71,0.08); font-size: 11.5px; line-height: 1.35; }
.issue > span { flex: 1; min-width: 0; }
.issue.err { border-color: rgba(255,107,107,0.4); background: rgba(255,107,107,0.08); }
.issue.ok { border-color: rgba(91,214,138,0.35); background: rgba(91,214,138,0.07); color: var(--text-muted); }
.btn.sm { height: 26px; flex: none; }
.outline { display: flex; flex-direction: column; gap: 2px; }
.orow { display: flex; align-items: center; gap: 10px; height: 28px; padding: 0 10px; border-radius: 6px; border: 1px solid transparent; background: none; color: var(--text); font: inherit; text-align: left; }
.orow:hover { background: var(--surface); }
.orow.sel { border-color: var(--accent); background: var(--accent-tint); }
.orow.dim .oname { color: var(--text-muted); }
.odot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.oname { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oz { color: var(--text-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.link.more { align-self: flex-start; }
.toggles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.tog { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 34px; padding: 0 10px; border-radius: 7px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 11.5px; text-align: left; }
.tog > span:first-child { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-track { width: 28px; height: 16px; border-radius: 99px; display: flex; align-items: center; padding: 2px; box-sizing: border-box; background: var(--border); flex: none; }
.sw-knob { width: 12px; height: 12px; border-radius: 50%; background: var(--text-muted); transition: transform 0.15s; }
.tog[aria-pressed="true"] .sw-track { background: var(--accent); }
.tog[aria-pressed="true"] .sw-knob { background: #0E1430; transform: translateX(12px); }
.btn-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.btn-grid .btn { height: 34px; }
@media (prefers-reduced-motion: reduce) { .sw-knob { transition: none; } }

/* Look · HDRI thumbnails, starter kit header */
.hdris { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
@media (max-width: 339px) { .hdris { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.hdri { display: flex; flex-direction: column; gap: 3px; padding: 3px; border-radius: var(--r-small); background: var(--surface); border: 1px solid var(--border); color: var(--text-muted); min-width: 0; }
.hdri .th { display: block; height: 26px; border-radius: 3px; background-size: cover; background-position: center; background-color: #222; font-size: 15px; line-height: 26px; text-align: center; color: var(--text-muted); }
.hdri .th.custom { background: linear-gradient(135deg, #3A4569, #1B1F2B); }
.hdri span:last-child { font-size: 9px; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.hdri[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-tint); color: var(--text); }
.hdri.add { border-style: dashed; background: none; }
.hdri:hover:not(:disabled) { color: var(--text); border-color: var(--border-dashed); }
.kit-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-top: 4px; }
.kit-head .muted { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Proximity › Text (word list preview) */
.preview.ptext { perspective: 520px; overflow: hidden; }
.tl-bg { position: absolute; inset: 0; }
.tl-bar { position: absolute; top: 50%; z-index: 0; }
.tl-bar.band { background: rgba(255,255,255,0.06); border-top: 1px solid rgba(255,255,255,0.10); border-bottom: 1px solid rgba(255,255,255,0.10); }
.tl-stage { position: absolute; inset: 0; transform-style: preserve-3d; z-index: 1; }
.tl-w { position: absolute; top: 50%; white-space: nowrap; line-height: 1.1; backface-visibility: hidden; will-change: transform, opacity, filter; }
.tl-arrow, .tl-dots { position: absolute; top: 50%; z-index: 2; }
.tl-dots { transform: translateY(-50%); letter-spacing: 2px; font-weight: 700; }
.tl-brk { position: absolute; top: 50%; z-index: 2; transform: translateX(-50%); border-left: 2px solid; border-right: 2px solid; border-radius: 4px; opacity: 0.8; }
.preview.ptext .cap { z-index: 3; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stack-lbl { display: flex; flex-direction: column; gap: 6px; }
.stack-lbl textarea { width: 100%; resize: vertical; min-height: 92px; padding: 8px 10px; border-radius: 6px; border: 1px solid var(--border); background: var(--panel-bg); color: var(--text); font: inherit; line-height: 1.45; }
.tswatch { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px; border-radius: 6px; background: var(--surface); border: 1px solid var(--border); cursor: pointer; }
.tswatch input[type="color"] { width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.tswatch input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.tswatch input[type="color"]::-webkit-color-swatch { border: 1px solid rgba(255,255,255,0.25); border-radius: 50%; }
