:root {
  --bg:          #1a1a1e;
  --surface:     #222226;
  --surface-2:   #2a2a2e;
  --border:      rgba(255, 255, 255, 0.10);
  --border-2:    rgba(255, 255, 255, 0.06);
  --accent:      #e0e0e8;   /* light silver   */
  --accent-2:    #909098;   /* medium grey    */
  --green:       #86efac;
  --red:         #fca5a5;
  --text:        #f4f4f8;
  --text-mid:    #a0a0ac;
  --text-dim:    #606068;
  --radius-xl:   18px;
  --radius-lg:   14px;
  --radius-md:   10px;
  --radius-sm:   8px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}

/* ── Topbar ───────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  height: 54px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  user-select: none;
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar__logo {
  font-size: 18px;
  color: var(--accent);
  line-height: 1;
  opacity: 0.85;
}

.topbar__title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: #ffffff;
}

.topbar__hint {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-dim);
  letter-spacing: 0.1px;
}

/* ── Workspace ────────────────────────────── */
.workspace {
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: 18px;
  padding: 18px 22px;
  flex: 1;
  min-height: 0;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}

/* ── Preview pane ─────────────────────────── */
.preview-pane {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.canvas-container {
  position: relative;
  background: #18181c;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255,255,255,0.04);
}

#preview-canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.preview-footer {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ── Controls pane ────────────────────────── */
.controls-pane {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  min-width: 0;
}

/* ── Responsive ───────────────────────────── */
@media (max-width: 880px) {
  .workspace {
    grid-template-columns: 1fr;
    padding: 14px 16px;
  }
  .controls-pane { overflow-y: visible; }
  .topbar__hint  { display: none; }
}
