.theme-workbench {
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 14px 36px rgb(32 37 53 / 0.05);
  padding: 28px;
}

.theme-control-bar {
  align-items: end;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.7fr);
  padding: 20px;
}

.theme-workbench .section-title {
  font-size: 1.55rem;
  letter-spacing: 0;
  margin-bottom: 6px;
}

.theme-workbench .intro-text {
  color: var(--muted);
  grid-column: 1;
  margin: 0;
}

.theme-base-field {
  grid-column: 2;
  grid-row: 1 / span 2;
  margin: 0;
}

.theme-actions {
  grid-column: 1 / -1;
}

.theme-preview-grid {
  gap: 16px;
  margin-top: 18px;
}

.theme-preview-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  min-width: 0;
  padding: 14px;
}

.theme-preview-card h3 {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: 0;
  margin: 0 0 10px;
}

.theme-preview {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 190px;
  padding: 22px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.theme-preview-title {
  font-size: 1.12rem;
  font-weight: 900;
  margin: 0 0 8px;
}

.theme-preview-copy {
  line-height: 1.55;
  margin: 0 0 18px;
}

.theme-preview-button {
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 800;
  min-height: 42px;
  padding: 9px 16px;
}

.theme-code-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 16px;
}

.theme-code-card .code-copy-block {
  margin-top: 8px;
  max-height: 320px;
  white-space: pre;
}

.theme-copy-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}

.theme-copy-status {
  color: var(--brand-dark);
  font-size: 0.9rem;
  font-weight: 800;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.theme-copy-status.visible {
  opacity: 1;
}

@media (max-width: 780px) {
  .theme-control-bar {
    grid-template-columns: 1fr;
  }

  .theme-workbench .intro-text,
  .theme-base-field,
  .theme-actions {
    grid-column: 1;
    grid-row: auto;
  }
}

@media (max-width: 560px) {
  .theme-workbench {
    padding: 18px;
  }

  .theme-control-bar {
    padding: 16px;
  }

  .theme-preview {
    min-height: 170px;
    padding: 18px;
  }
}
