:root {
  --bg: #0d0f11;
  --surface: #15181b;
  --surface-2: #1d2125;
  --line: #2a2f34;
  --text: #eef1f3;
  --muted: #9aa3ab;
  --accent: #d9a441;          /* warm brass — reads as 'finish' */
  --accent-2: #7fb0a8;
  --radius: 14px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ── top bar ── */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: rgba(13,15,17,0.82);
  backdrop-filter: blur(10px); z-index: 5;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 600; letter-spacing: .2px; }
.brand img { height: 26px; width: auto; }
.tagline { margin: 0; color: var(--muted); font-size: 13px; letter-spacing: .18em; text-transform: uppercase; }

/* ── studio layout ── */
.studio {
  display: grid; gap: 20px; padding: 20px;
  grid-template-columns: minmax(0, 1fr) 320px;
  max-width: 1280px; margin: 0 auto;
}
@media (max-width: 860px) {
  .studio { grid-template-columns: 1fr; }
}

/* ── stage ── */
.stage-wrap { position: relative; }
#stage {
  width: 100%; height: auto; display: block;
  background: #000; border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: 0 18px 50px rgba(0,0,0,.45);
}
.stage-tools {
  position: absolute; left: 12px; bottom: 46px;
  display: flex; gap: 8px;
}
.status {
  margin: 10px 2px 0; color: var(--muted); font-size: 13.5px; min-height: 1.2em;
}

.busy {
  position: absolute; inset: 0; display: none; align-items: center; justify-content: center;
  background: rgba(8,9,11,.45); border-radius: var(--radius); backdrop-filter: blur(2px);
}
.busy.on { display: flex; }
.spinner {
  width: 38px; height: 38px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.18); border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── panel ── */
.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; align-self: start;
  display: flex; flex-direction: column; gap: 20px;
}
.mode { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
select {
  appearance: none; background: var(--surface-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; font-size: 15px;
}

.group h2 {
  margin: 0 0 10px; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
}
.strip {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(82px, 1fr)); gap: 10px;
}
.swatch {
  position: relative; aspect-ratio: 1; border-radius: 12px; cursor: pointer;
  border: 2px solid transparent; overflow: hidden; padding: 0;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.25); transition: transform .18s var(--ease), border-color .18s var(--ease);
}
.swatch:hover { transform: translateY(-2px); }
.swatch.active { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(217,164,65,.25); }
.swatch-name {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 4px 6px;
  font-size: 10.5px; line-height: 1.2; color: #fff; text-align: left;
  background: linear-gradient(transparent, rgba(0,0,0,.7)); text-shadow: 0 1px 2px rgba(0,0,0,.6);
}

/* ── buttons ── */
button { font: inherit; cursor: pointer; }
.primary {
  background: var(--accent); color: #1a1206; border: none; border-radius: 11px;
  padding: 13px 16px; font-weight: 600; letter-spacing: .02em; transition: filter .15s var(--ease);
}
.primary:hover { filter: brightness(1.07); }
.ghost {
  background: rgba(20,23,26,.78); color: var(--text); border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 13px; font-size: 13px; backdrop-filter: blur(6px);
}
.ghost:active { background: rgba(217,164,65,.22); }
.ghost.accent { background: var(--accent); color: #1a1206; border-color: var(--accent); font-weight: 600; }
.ghost.accent:hover { filter: brightness(1.07); }

.fineprint { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }

/* ── zoom ── */
.zoom-wrap {
  display: flex; align-items: center; gap: 10px; margin-top: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 12px;
}
.zoom-wrap[hidden] { display: none; }
.zoom-ico { color: var(--muted); font-size: 18px; width: 12px; text-align: center; }
.zoom-val { color: var(--text); font-size: 13px; font-variant-numeric: tabular-nums; min-width: 38px; text-align: right; }
#zoom { flex: 1; accent-color: var(--accent); height: 4px; }

/* ── dimensions ── */
.dims-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dims-grid > div { display: flex; flex-direction: column; gap: 2px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.dims-num { font-size: 22px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.dims-lbl { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.dims-note { margin: 10px 0 0; font-size: 11px; color: var(--muted); line-height: 1.5; }
