/* TresCAD — редактор фасада. Токены — terminal.css, система — DESIGN.md
   Одна рабочая среда: колонки разделены линией 1px и сменой поверхности, без карточек. */

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 13px/1.5 var(--font);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  touch-action: manipulation;
}
::selection { background: #ff7a1a55; color: var(--text); }
* { scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
button, input, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
button { background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }
h1, h2, p, ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
kbd { font: inherit; font-size: 11px; color: var(--text-dim); margin-left: auto; }
svg.lucide { width: 14px; height: 14px; stroke-width: 1.5; flex: none; }

.accent { color: var(--accent); }
.muted { color: var(--text-muted); }
.dim { color: var(--text-dim); }
.grow { flex: 1; }
/* Заголовок секции: спокойный, как в IDE */
.label {
  font-size: 11px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase;
  color: var(--text-dim);
}
.label .muted-case { text-transform: none; letter-spacing: 0; font-weight: 400; }

/* ─── Layout ─────────────────────────────────────────── */
.app {
  height: 100vh; height: 100dvh; min-height: 720px;
  display: grid; gap: 0;
  grid-template-columns: 256px minmax(0, 1fr) 380px;
  grid-template-rows: 44px auto auto minmax(0, 1fr) 168px;
  grid-template-areas:
    "title  title  title"
    "side   steps  steps"
    "side   tools  tools"
    "side   canvas right"
    "bottom bottom bottom";
}
.titlebar { grid-area: title; }
.sidebar  { grid-area: side; display: flex; flex-direction: column; min-height: 0; overflow-y: auto; background: var(--panel); border-right: 1px solid var(--border-soft); }
.steps    { grid-area: steps; }
.toolbar  { grid-area: tools; }
.canvas   { grid-area: canvas; }
.right    { grid-area: right; display: flex; flex-direction: column; min-height: 0; overflow-y: auto; background: var(--panel); border-left: 1px solid var(--border-soft); }
.bottom   { grid-area: bottom; display: grid; grid-template-columns: 1.35fr 1fr 1fr 1fr 0.8fr; min-height: 0; background: var(--panel); border-top: 1px solid var(--border-soft); }

/* Секция внутри колонки: без рамки и фона, отделена линией */
.panel { padding: 16px; min-width: 0; }
.sidebar > .panel + .panel, .right > .panel + .panel { border-top: 1px solid var(--border-soft); }
.bottom > .panel + .panel { border-left: 1px solid var(--border-soft); }
.panel > .label { margin-bottom: 12px; }
.panel-head { display: flex; align-items: center; gap: 4px; margin-bottom: 12px; min-height: 22px; }

/* ─── Titlebar ───────────────────────────────────────── */
.titlebar { display: flex; align-items: center; gap: 24px; padding: 0 16px; border-bottom: 1px solid var(--border-soft); }
.brand { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo .brand-icon { display: block; width: 22px; height: 22px; border-radius: 5px; }
.logo .brand-word { display: block; height: 16px; width: auto; }
.brand-name { font-size: 13px; font-weight: 500; }
.brand .muted { color: var(--text-dim); }
.brand .dim { color: var(--text-disabled); font-size: 12px; }
.meta { display: flex; gap: 22px; margin: 0 0 0 auto; font-size: 12px; white-space: nowrap; }
.meta div { display: flex; gap: 8px; }
.meta dt { color: var(--text-dim); }
.meta dt::after { content: ":"; }
.meta dd { margin: 0; color: var(--text-muted); }
.meta a { color: var(--text); }

/* ─── Sidebar ────────────────────────────────────────── */
/* Выбранная строка: светлее фон + узкий оранжевый маркер + оранжевый текст */
.workflow { display: flex; flex-direction: column; gap: 2px; }
.wf-item {
  display: flex; align-items: flex-start; gap: 12px; padding: 6px 10px; text-align: left;
  border-radius: var(--radius-sm); color: var(--text-muted);
  transition: background-color 120ms ease, color 120ms ease;
}
.wf-item .num { color: var(--text-disabled); width: 2ch; }
.wf-t { display: flex; flex-direction: column; }
.wf-t small { font-size: 11px; color: var(--text-dim); }
.wf-item.is-active { background: var(--hover); color: var(--text); box-shadow: inset 2px 0 0 var(--accent); }
.wf-item.is-active .num { color: var(--accent); }
.wf-item .live-dot { display: none; }
.live-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none;
  animation: pulse 1.6s var(--ease-out) infinite;
}
@keyframes pulse { 50% { opacity: .35; } }

.obj-list { display: flex; flex-direction: column; gap: 1px; }
.obj {
  width: 100%; display: flex; align-items: center; gap: 12px; height: 28px; padding: 0 10px;
  border-radius: var(--radius-sm); text-align: left; color: var(--text-muted);
  transition: background-color 120ms ease, color 120ms ease;
}
.obj svg { color: var(--text-dim); }
.obj.is-active { background: var(--hover); color: var(--text); box-shadow: inset 2px 0 0 var(--accent); }
.obj.is-active svg { color: var(--accent); }

.toggles { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border-soft); display: flex; flex-direction: column; }
.check { display: flex; align-items: center; gap: 12px; height: 26px; padding: 0 10px; cursor: pointer; color: var(--text-muted); }
.check input {
  appearance: none; margin: 0; width: 14px; height: 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--panel-2);
  display: grid; place-items: center; cursor: pointer; flex: none;
}
.check input:checked { background: var(--accent); border-color: var(--accent); }
.check input:checked::after { content: ""; width: 7px; height: 4px; border: solid #111; border-width: 0 0 1.5px 1.5px; transform: translateY(-1px) rotate(-45deg); }

.zones { flex: 1; min-height: 200px; display: flex; flex-direction: column; }
.add-zone {
  display: flex; align-items: center; gap: 10px; height: 28px; padding: 0 10px; margin-bottom: 8px;
  border-radius: var(--radius-sm); color: var(--text-muted);
}
.add-zone svg { color: var(--text-dim); }
.zone-list { overflow-y: auto; display: flex; flex-direction: column; gap: 1px; min-height: 0; }
.zone {
  width: 100%; display: flex; align-items: flex-start; gap: 12px; padding: 6px 10px; text-align: left;
  border-radius: var(--radius-sm); color: var(--text-muted);
}
.zone .num { color: var(--text-disabled); }
.z-body { display: flex; flex-direction: column; font-size: 12px; min-width: 0; }
.z-hint { color: var(--text-dim); font-size: 11px; }
.zone.is-active { background: var(--hover); color: var(--text); box-shadow: inset 2px 0 0 var(--accent); }
.zone.is-active .num { color: var(--accent); }
.z-flag { display: none; }

/* ─── Hover (только для мыши) ────────────────────────── */
@media (hover: hover) {
  .wf-item:not(.is-active):hover, .obj:not(.is-active):hover, .zone:not(.is-active):hover,
  .add-zone:hover, .icon-btn:hover, .tool:not(.is-active):not(:disabled):hover,
  .btn-secondary:hover { background: var(--hover); color: var(--text); }
  .segmented button:not(.is-active):hover { color: var(--text); }
  .step:not(.is-active):hover { color: var(--text); }
  .answers button:hover { color: var(--text); }
  .btn-primary:hover { background: #ff7a1a26; }
  .field select:hover, .field input:not([readonly]):hover, .stepper:hover, .with-swatch:hover { border-color: var(--border); }
}

/* ─── Steps: полоса процесса ─────────────────────────── */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 0 8px; border-bottom: 1px solid var(--border-soft); }
.step {
  display: flex; align-items: baseline; gap: 12px; padding: 12px 12px 11px; text-align: left;
  color: var(--text-muted); transition: color 120ms ease, box-shadow 160ms var(--ease-out);
}
.step-num { font-size: 12px; color: var(--text-disabled); }
.step b { display: block; font-weight: 500; }
.step small { color: var(--text-dim); font-size: 11px; }
.step.is-active { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
.step.is-active .step-num { color: var(--accent); }

/* ─── Toolbar: полоса команд ─────────────────────────── */
.toolbar { display: flex; align-items: center; gap: 16px; padding: 6px 12px 6px 20px; border-bottom: 1px solid var(--border-soft); }
.toolbar > .label { margin: 0; flex: none; }
.tools { display: flex; align-items: stretch; gap: 2px; overflow-x: auto; flex: 1; min-width: 0; scrollbar-width: none; }
.tool {
  display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 58px; flex: none; padding: 5px 6px 4px;
  border-radius: var(--radius-sm); font-size: 11px; color: var(--text-dim);
  transition: transform 160ms var(--ease-out), background-color 120ms ease, color 120ms ease;
}
.tool svg { width: 16px; height: 16px; color: var(--text-muted); }
.tool:active:not(:disabled), .obj:active, .btn-primary:active, .btn-secondary:active, .step:active { transform: scale(0.97); }
.tool.is-active { background: var(--hover); color: var(--text); }
.tool.is-active svg { color: var(--accent); }
.tool:disabled, .tool:disabled svg { color: var(--text-disabled); }
.tools .sep { width: 1px; background: var(--border-soft); margin: 6px 6px; flex: none; }
.tools .grow { flex: 1; min-width: 8px; }

/* ─── Canvas: главная зона, без декора внутри ───────── */
.canvas { display: flex; flex-direction: column; min-height: 0; padding: 14px 20px 20px; }
.canvas-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 12px; color: var(--text-dim); white-space: nowrap; min-width: 0; }
.canvas-head h1 { margin-right: 10px; }
.canvas-head b { font-weight: 400; color: var(--text-muted); }
.zoom { display: flex; align-items: center; gap: 2px; }
.zoom-val { min-width: 52px; text-align: center; padding: 3px 6px; font-size: 12px; color: var(--text-muted); }
.icon-btn { display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--radius-sm); color: var(--text-dim); transition: background-color 120ms ease, color 120ms ease; }
.canvas-stage {
  flex: 1; min-height: 0; position: relative; overflow: hidden; border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  background-color: var(--well);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
}
.canvas-stage.no-grid { background-image: none; }
#wall { position: absolute; inset: 0; width: 100%; height: 100%; transform-origin: center; transition: transform 200ms var(--ease-out); }
#wall text { font-family: var(--font); fill: var(--text-dim); }
#wall .cell { cursor: pointer; transition: filter 120ms ease; }
@media (hover: hover) { #wall .cell:hover { filter: brightness(1.2); } }
.no-dims #wall .dims { display: none; }

/* ─── Right column: инспектор ────────────────────────── */
.preview { flex: none; }
.preview-stage { border-radius: var(--radius-sm); background: var(--well); aspect-ratio: 16 / 9; max-height: 22vh; width: 100%; }
.preview-stage .house { margin: 0 auto; }
.house { width: 100%; height: 100%; display: block; }
.house path { fill: none; vector-effect: non-scaling-stroke; }
.house .wire path { stroke: #a3a3a0; stroke-width: 1; }
.house .wire .thin { stroke: #5f5f5f; }
.house .ground path { stroke: #282828; stroke-width: 1; }
.house .hot path { stroke: var(--accent); stroke-width: 1.5; fill: #ff7a1a1c; }
.preview-meta { display: flex; align-items: center; gap: 8px; margin: 10px 0 8px; font-size: 12px; color: var(--text-muted); }
.live { display: flex; align-items: center; gap: 6px; }
.live .live-dot { background: var(--text-dim); }

/* Вкладки: активная — светлый текст и тонкая оранжевая линия */
.segmented { display: flex; gap: 0; border-bottom: 1px solid var(--border-soft); }
.segmented button {
  flex: 1; height: 28px; font-size: 12px; color: var(--text-dim); white-space: nowrap;
  transition: color 120ms ease, box-shadow 120ms ease;
}
.segmented button.is-active { color: var(--text); box-shadow: inset 0 -1px 0 var(--accent); }
.seg-lg button { height: 32px; }

/* Инспектор свойств: выровненные строки + настоящие поля */
.props { flex: 1 0 auto; }
.props .label .muted-case { color: var(--text-dim); margin-left: 6px; }
.fields { display: flex; flex-direction: column; gap: 4px; margin-top: 14px; }
.field { display: grid; grid-template-columns: 116px minmax(0, 1fr); align-items: center; gap: 8px; min-height: 30px; }
.field > span:first-child { color: var(--text-dim); font-size: 12px; }
.field select, .field input, .stepper, .with-swatch {
  width: 100%; height: 28px; background: var(--panel-2); padding: 0 8px; font-size: 12px;
  border: 1px solid var(--border-soft); border-radius: var(--radius-sm);
  transition: border-color 120ms ease;
}
.field select:focus-visible, .field input:focus-visible { outline: 0; border-color: var(--accent); }
.stepper:focus-within, .with-swatch:focus-within { border-color: var(--accent); }
.field select { appearance: none; color: var(--text); cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%236b6b69' stroke-width='1.5'%3E%3Cpath d='M3 4.5l3 3 3-3'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 6px center; padding-right: 26px; }
.field select option { background: var(--panel); }
.field input[readonly] { color: var(--text-muted); background: transparent; border-color: transparent; }
.stepper { display: flex; align-items: center; padding: 0 0 0 8px; }
.stepper input { border: 0; background: none; height: 100%; padding: 0; appearance: textfield; -moz-appearance: textfield; }
.stepper input:focus-visible { border: 0; }
.stepper input::-webkit-inner-spin-button { display: none; }
.step-btns { display: flex; flex-direction: column; height: 100%; border-left: 1px solid var(--border-soft); }
.step-btns button { flex: 1; width: 22px; display: grid; place-items: center; color: var(--text-dim); }
.step-btns button:hover { color: var(--text); }
.step-btns svg { width: 11px; height: 11px; }
.with-swatch { display: flex; align-items: center; gap: 8px; padding: 0 0 0 8px; }
.with-swatch select { border: 0; height: 100%; padding-left: 0; background-color: transparent; }
.swatch { width: 12px; height: 12px; border-radius: 2px; background: #8a8c8f; border: 1px solid #0006; flex: none; }
.status { display: flex; align-items: center; gap: 8px; padding-left: 8px; font-size: 12px; color: var(--text-muted); }
.ok-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }

.extra { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border-soft); }
.extra summary { display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; color: var(--text-dim); font-size: 12px; }
.extra summary::-webkit-details-marker { display: none; }
.extra summary svg { width: 12px; height: 12px; transition: transform 160ms var(--ease-out); transform: rotate(-90deg); }
.extra[open] summary svg { transform: none; }
.extra .kv { margin: 10px 0 0 20px; }
.extra .kv dd { color: var(--text-muted); }

/* Лог — здесь терминальный язык уместен */
.logp { flex: none; height: 172px; display: flex; flex-direction: column; }
.logp .panel-head { margin-bottom: 8px; }
.logp .log { overflow-y: auto; min-height: 0; flex: 1; gap: 6px; }
.logp .log li.is-new .line { color: var(--text); }

/* ─── Bottom: единая полоса статуса и команд ─────────── */
.assistant { display: flex; gap: 18px; align-items: center; }
.mascot { width: 72px; height: 66px; flex: none; opacity: .9; }
.blink { animation: pulse 1.2s steps(2) infinite; }
.assistant-body { display: flex; flex-direction: column; gap: 10px; min-width: 0; flex: 1; }
.assistant-body .label { margin: 0; }
.bubble { padding: 0 0 0 2ch; font-size: 12px; line-height: 1.6; text-wrap: pretty; text-indent: -2ch; color: var(--text); }
.bubble::before { content: "> "; color: var(--accent); }
.answers { display: flex; gap: 18px; font-size: 12px; padding-left: 2ch; }
.answers button { color: var(--text-dim); transition: color 120ms ease; }
.answers button.accent { color: var(--accent); }

.stats .kv { gap: 5px 16px; }
.stats .kv dd { text-align: right; color: var(--text-muted); }
.stats .kv b { color: var(--text); }

.actions { display: flex; flex-direction: column; gap: 8px; }
.actions .label { margin-bottom: 4px; }
.btn-primary {
  display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 12px;
  border: 1px solid #ff7a1a8c; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--text); text-align: left;
  transition: transform 160ms var(--ease-out), background-color 120ms ease;
}
.btn-primary svg { color: var(--accent); }
.btn-primary kbd { color: var(--text-dim); }
.btn-primary .btn-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.btn-row { display: flex; gap: 6px; }
.btn-secondary {
  flex: 1; display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 12px;
  border: 1px solid var(--border-soft); border-radius: var(--radius-sm); white-space: nowrap; color: var(--text-muted);
  transition: transform 160ms var(--ease-out), background-color 120ms ease;
}
.btn-secondary svg { color: var(--text-dim); }
.btn-secondary.icon-only { flex: none; width: 32px; padding: 0; justify-content: center; }

.commands dl { display: grid; grid-template-columns: auto 1fr; gap: 5px 18px; font-size: 12px; }
.commands dt { color: var(--text-muted); }
.commands dd { color: var(--text-dim); }

.clock { display: flex; flex-direction: column; gap: 0; }
.clock .kv dd { color: var(--text-muted); }
.clock time { font-variant-numeric: tabular-nums; }

/* ─── Toast ──────────────────────────────────────────── */
.toast {
  position: fixed; left: 50%; bottom: 190px; border-radius: var(--radius); translate: -50% 0; z-index: 10;
  padding: 8px 14px; border: 1px solid var(--border); background: var(--panel-2); font-size: 12px;
  box-shadow: 0 8px 24px -12px #0009;
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out);
}
.toast[hidden] { display: block; opacity: 0; transform: translateY(6px); pointer-events: none; }

/* ─── Responsive ─────────────────────────────────────── */
@media (max-height: 1000px) {
  .preview-stage { max-height: 16vh; }
  .logp { height: 128px; }
}
@media (max-width: 1400px) {
  .app { grid-template-columns: 228px minmax(0, 1fr) 340px; }
  .bottom { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
  .clock { display: none; }
  .field { grid-template-columns: 100px minmax(0, 1fr); }
  .meta .meta-st { display: none; }
  .canvas-head .c-extra { display: none; }
  .step small { display: none; }
  .btn-primary kbd { display: none; }
}
@media (max-width: 1100px) {
  .app {
    height: auto; min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-template-areas: "title" "steps" "tools" "canvas" "right" "side" "bottom";
  }
  .sidebar, .right { border: 0; border-top: 1px solid var(--border-soft); }
  .canvas { height: 70vh; min-height: 420px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toolbar > .label { display: none; }
  .meta { display: none; }
  .bottom { grid-template-columns: minmax(0, 1fr); }
  .bottom > .panel + .panel { border-left: 0; border-top: 1px solid var(--border-soft); }
  .clock { display: flex; }
}
@media (max-width: 560px) {
  .titlebar { padding: 0 12px; }
  .canvas { padding: 12px; }
  .step { gap: 8px; padding: 10px 8px; }
  .brand .muted, .brand .dim { display: none; }
  .field { grid-template-columns: 1fr; gap: 2px; }
  .canvas { height: auto; min-height: 0; }
  .canvas-head { flex-wrap: wrap; row-gap: 4px; }
  .canvas-head .grow { flex-basis: 100%; }
  .canvas-stage { flex: none; aspect-ratio: 4 / 3.4; }
  .btn-secondary span { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0ms !important; }
}

/* ─── Привязки и режимы (под канвасом) ─── */
.modes { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border-soft); }
.modes-title { margin-right: 6px; }
.mode-btn { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--border-soft); border-radius: var(--radius-sm); color: var(--text-dim); transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease; }
.mode-btn svg { width: 15px; height: 15px; }
.mode-btn.is-active { background: var(--hover); border-color: var(--border); color: var(--accent); }
@media (hover: hover) { .mode-btn:not(.is-active):hover { background: var(--hover); color: var(--text); } }
.mode-btn:active { transform: scale(0.96); }
.mode-sep { width: 1px; height: 18px; background: var(--border-soft); margin: 0 2px; }
.mode-select { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 8px 0 10px; border: 1px solid var(--border-soft); border-radius: var(--radius-sm); font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .05em; }
.mode-select select { appearance: none; background: transparent; border: 0; color: var(--text); font: inherit; text-transform: none; letter-spacing: 0; font-size: 12px; cursor: pointer; padding: 0 16px 0 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%236b6b69' stroke-width='1.5'%3E%3Cpath d='M3 4.5l3 3 3-3'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right center; }
.mode-select select:focus-visible { outline: 0; color: var(--accent); }
.mode-select select option { background: var(--panel); text-transform: none; }

/* ─── Свойства зоны ─── */
.zone-group > summary { color: var(--text); }
.zone-area { margin: 12px 0 4px 0; }
.zone-area dd { text-align: right; }
.zone-label { margin: 14px 0 8px; font-size: 12px; color: var(--text-dim); }
.material-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.material-option { display: flex; flex-direction: column; gap: 6px; text-align: center; font-size: 10px; color: var(--text-dim); transition: color 120ms ease; }
.material-option b { font-weight: 400; overflow: hidden; text-overflow: ellipsis; }
.material-option .mat { display: block; width: 100%; aspect-ratio: 1; border-radius: var(--radius-sm); border: 1px solid #0007; transition: transform 160ms var(--ease-out); }
.material-option:active .mat { transform: scale(0.96); }
.material-option.is-active { color: var(--text); }
.material-option.is-active .mat { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (hover: hover) { .material-option:not(.is-active):hover { color: var(--text-muted); } }
.orient { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.orient button { display: flex; align-items: center; justify-content: center; gap: 8px; height: 34px; border: 1px solid var(--border-soft); border-radius: var(--radius-sm); color: var(--text-muted); font-size: 12px; transition: background-color 120ms ease, color 120ms ease; }
.orient button.is-active { background: var(--hover); border-color: var(--border); color: var(--text); }
.orient button.is-active svg { color: var(--accent); }
@media (hover: hover) { .orient button:not(.is-active):hover { background: var(--hover); color: var(--text); } }
.zone-offset { margin-top: 14px; }
.zone-offset input:disabled { color: var(--text-disabled); }
.extra + .extra { margin-top: 0; padding-top: 10px; }
.props [data-inspector] > .extra:first-child { margin-top: 14px; }

/* материалы — текстуры (как на сайте) */
.mat-wood { background: repeating-linear-gradient(180deg, #8a4e27 0 11px, #6e3a1c 11px 13px), #7a4322; }
.mat-plaster { background: radial-gradient(circle at 30% 40%, #d9d6cc 0 20%, transparent 21%), radial-gradient(circle at 70% 70%, #cfcbc0 0 18%, transparent 19%), #e3e0d7; }
.mat-fiber { background: linear-gradient(180deg, #a3a6aa 0 49%, #7d8084 49% 51%, #a9acb0 51%); }
.mat-metal { background: repeating-linear-gradient(90deg, #2d2f33 0 14px, #55585d 14px 16px), #34363a; }
.mat-stone { background: linear-gradient(#0000 47%, #6f6a60 47% 53%, #0000 53%), linear-gradient(90deg, #0000 47%, #6f6a60 47% 53%, #0000 53%), #b3ab9c; background-size: 50% 33%; }
