.gradient-tool {
  display: grid;
  gap: 18px;
}

.gradient-preview {
  width: 100%;
  min-height: 180px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.gradient-form {
  display: grid;
  gap: 14px;
}

.field-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: end;
}

.field {
  display: grid;
  gap: 6px;
}

.field span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.field select,
.field input[type="range"] {
  padding: 10px 12px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
}

.field input[type="range"] {
  padding: 0;
  min-width: 160px;
}

.field output {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.stops-list {
  display: grid;
  gap: 10px;
}

.stop-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.stop-row input[type="color"] {
  width: 44px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: none;
}

.stop-row input[type="number"] {
  width: 72px;
  padding: 6px 8px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.stop-row .stop-position-label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.utility-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

#cssOutput {
  width: 100%;
  min-height: 90px;
  padding: 12px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.9rem;
  resize: vertical;
}

@media (max-width: 860px) {
  .field-row {
    flex-direction: column;
    align-items: stretch;
  }

  .utility-row .action-button {
    width: 100%;
  }
}

/* Gradient text specifics */
.gradient-preview {
  display: grid;
  place-items: center;
  min-height: 200px;
  padding: 24px;
  background: var(--surface);
  overflow-wrap: anywhere;
}

.gradient-text-sample {
  margin: 0;
  line-height: 1.15;
  text-align: center;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.field input[type="text"] {
  min-width: 240px;
  padding: 10px 12px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
}

.preview-dark {
  background: #0f172a;
}

@media (max-width: 860px) {
  .field input[type="text"] {
    min-width: 0;
    width: 100%;
  }
}

.check-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  color: var(--text);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-weight: 800;
}
