:root{
  --rsynth-bg: #fff;
  --rsynth-border: #e5e7eb;
  --rsynth-text: #111827;
  --rsynth-muted: #6b7280;
  --rsynth-primary: #2563eb;
  --rsynth-danger: #dc2626;
  --rsynth-card: #f9fafb;
}
.rsynth{
  border:1px solid var(--rsynth-border);
  background: var(--rsynth-bg);
  border-radius: 14px;
  padding: 16px;
  margin: 14px 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--rsynth-text);
}
.rsynth-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.rsynth-title{ margin:0; font-size: 20px; line-height: 1.2; }
.rsynth-subtitle{ color: var(--rsynth-muted); margin-top: 4px; font-size: 13px; }
.rsynth-actions{ display:flex; gap: 8px; flex-wrap: wrap; }
.rsynth-btn{
  appearance: none;
  border: 1px solid var(--rsynth-border);
  background: #fff;
  color: var(--rsynth-text);
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
}
.rsynth-btn:hover{ filter: brightness(0.98); }
.rsynth-btn-primary{
  background: var(--rsynth-primary);
  border-color: var(--rsynth-primary);
  color: #fff;
}
.rsynth-btn-danger{
  background: var(--rsynth-danger);
  border-color: var(--rsynth-danger);
  color: #fff;
}
.rsynth-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
@media (max-width: 820px){
  .rsynth-grid{ grid-template-columns: 1fr; }
}
.rsynth-param{
  border:1px solid var(--rsynth-border);
  background: var(--rsynth-card);
  border-radius: 14px;
  padding: 12px;
}
.rsynth-param-label{
  font-weight: 800;
  font-size: 14px;
}
.rsynth-param-meta{
  color: var(--rsynth-muted);
  font-size: 12px;
  margin-top: 2px;
}
.rsynth-param-control{
  display:flex;
  align-items:center;
  gap: 10px;
  margin-top: 10px;
}
.rsynth-range{ width: 100%; }
.rsynth-number{
  width: 86px;
  border:1px solid var(--rsynth-border);
  border-radius: 10px;
  padding: 7px 8px;
  background: #fff;
}
.rsynth-select{
  width: 100%;
  border:1px solid var(--rsynth-border);
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
  font-weight: 600;
}
.rsynth-save{
  margin-top: 16px;
  border-top: 1px dashed var(--rsynth-border);
  padding-top: 14px;
}
.rsynth-save-row{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items:center;
}
.rsynth-input{
  border:1px solid var(--rsynth-border);
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
  min-width: 180px;
}
.rsynth-hint{ color: var(--rsynth-muted); font-size: 12px; margin-top: 8px; }
.rsynth-presets{
  margin-top: 18px;
  border-top: 1px dashed var(--rsynth-border);
  padding-top: 14px;
}
.rsynth-presets-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.rsynth-presets-tools{
  display:flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items:center;
}
.rsynth-presets-list{
  margin-top: 12px;
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 820px){
  .rsynth-presets-list{ grid-template-columns: 1fr; }
}
.rsynth-preset{
  border:1px solid var(--rsynth-border);
  border-radius: 14px;
  padding: 12px;
  background: #fff;
}
.rsynth-preset-top{ margin-bottom: 10px; }
.rsynth-preset-name{ font-weight: 900; }
.rsynth-preset-meta{ color: var(--rsynth-muted); font-size: 12px; margin-top: 2px; }
.rsynth-preset-actions{ display:flex; gap: 8px; flex-wrap: wrap; }
.rsynth-status{
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border:1px solid var(--rsynth-border);
  background: #fff;
  color: var(--rsynth-text);
  font-size: 13px;
}
.rsynth-status-ok{ border-color: #bbf7d0; background: #f0fdf4; }
.rsynth-status-err{ border-color: #fecaca; background: #fef2f2; }
.rsynth-status-info{ border-color: #bfdbfe; background: #eff6ff; }
.rsynth-muted{ color: var(--rsynth-muted); }
.rsynth-error{
  padding: 10px 12px;
  border-radius: 12px;
  border:1px solid #fecaca;
  background: #fef2f2;
}
